ormlite-servicestack's questions - Swedish 1answer

0 ormlite-servicestack questions.

I'm using OrmLite with both SqlServer, Oracle and PostgreSQL dialects. I want to use GUIDs as primary keys and have a simple object, using the AutoId attribute: public class MyObject { [AutoId] ...

I get "Object reference not set to an instance of an object" when using the Tuple notation with an Enum in the return structure. If I change the type in the tuple from Enum type to string it works ...

I use the ORMLite Poco generator for my database. The problem is that I have a table with multiple primary keys, and when I try to add any data into the database I get unique constraints. I have ...

The case: in web config: MultipleActiveResultSets=true There are two seperate connections in Web Request: public IDbConnection GetOpenConnection() { var connection = ...

Is it possible in ServiceStack OrmLite to return a key-value dictionary with a value that's an object (class or anonymous type)? For example: var q = db.From<Customers>() .Select(c =&...

I'm trying to get a distinct result set of tuples, but the Distinct never gets added to query. Example List<Tuple<Alpha, Beta>> results; var q = dbConn.From<Alpha>() ...

I am attempting to select a POCO using data from multiple different source tables using ServiceStack.OrmLite. I'm following the general syntax shown under C# 7 Tuples, but returning a concrete POCO ...

When I profiling the same select command: 4.0.50: SELECT "CustomerID", "CustomerCode", "CustomerName" FROM "dbo"."Customer" WHERE "CustomerCode" In ('871110000','864483025') 4.0.56: exec ...

first time using AutoQuery and I have this problem with unit testing after implementing AutoQuery. It works fine through Swagger manual testing. So I have a get method like this: public class ...

I'm having some troubles selecting a Tuple of Objects from my custom SQL query with ORMLite. I have the following code: var query = "select definition.*, timeslot.*, type.* from <blah blah>"; ...

Reading the documentation for ORMLite, it says to register the Connection Factory as a singleton if you're using an IoC container. Is this the correct syntax for that with ASPNET Core 2.0? Or should ...

Our DBA don't want us to use double quoted fields and tables in our queries (don't ask me the reason)... the problem is that ServiceStack.OrmLite double quote them all, and I don't have any idea on ...

I wanna use SqlGeography for its benefits in sql server 2016 and I have Visual Studio 2017 while using servicestack 4.5.14 and ormlite. First and foremost I want to have SqlGeography as data type for ...

We have an issue that occurs at every method call for limited periods of time. Then it works as expected. The issue is that the code produces double WHERE clauses. We're using Servicestack 4.5.14 ...

I've added a SqlExpressionSelectFilter to use the soft delete functionality in ServiceStack OrmLite. However, It only seems to apply the filter to the base table specified in the From<T> and not ...

I am looking into ORMLite from ServiceStack and what I am trying to do here is that call a stored procedure which in turn return many many rows which definitely would not be bound to any domain object ...

I am new to ServiceStack, The extensiblity of this framework just blow my mind. but it didnt seems to me any example to extend the data type of UserAuth. The IUserAuth interface seems to be tightly ...

I am trying to pass a table name as a parameter to the ExecuteSql() method. This is what I have tried: var viewName = "search_view"; using (var db = dbFactory.Open()) { ...

Our current data model has sub-objects, something like BaseObject-->NodeStart-->SomeDateTime and so on. In our current, custom implemented data handling, we "serialize" the complex objects in ...

I am running Ormlite against a sqlite database. Love it. I am adding and deleting lots of records and find that the database does well with an occasional Vacuum command. How can I issue this around ...

I'm trying to update my datagrid after I update/add/delete items from the database. Should I create a thread running in a loop and query the database? I'm using servicestack.ormlite

(Im running ServiceStack OrmLite 5.1.1) I happen to have a few objects that has a long name, and creating the table as it is setup now creates a table with a long name. When OrmLite tries to create ...

I have an existing SQLite database that is generated in ServiceStack ORMLite. It has a field that represents a property of type Dictionary in C#. ServiceStack serializes this into the database as ...

Is it possible to select some columns into an object with complex properties? var q = db.From<DeptEmployee>() .Join<Department>() .Select<DeptEmployee, Department>((de, d2) =...

I looked through the docs and I didn't find anything on this subject, but I thought I'd ask, to be sure: Is there a way for OrmLites INSERT and UPDATE APIs to make it possible in one query, to insert/...

I have asked questions regarding serialization and deserialization before regarding ServiceStack OrmLite, and I am not sure if this is the same issues Ive had before, but I dont htink so, so here goes:...

I let ServiceStack OrmLite (5.1.1) create the table, and persist the object, that contains a TimeSpan: // ... public TimeSpan _Jobs_VehicleNotificationTime { get; set; } // ... When I try to read it ...

Well, in ServiceStack where can I read up on the merits and differences of [References(typeof(ABC))] and [ForeignKey(typeof(XYZ) ] What are they used for ? (I know, rather naively put but I ...

Is there a database diagram tool understanding Servicestack/Ormlite like the Entity Framework Power Tool for ASP.NET Entity Framework ?

The following is possibly two questions. When trying to avoid asking questions here at Stackoverflow I guess each and everyone of us do the following: searches need to consider a number of questions ...

I found out that the tables created followed the collation_database/collation_server variables in MySql. I was confused for a while why "Ö" and "O" was interpreted the same way, but when I realized ...

As I continue testing out OrmLite, I ran into another problem, this one appears to happen in the ServiceStack.Text.AssemblyUtils: System.NullReferenceException: Object reference not set to an ...

In a previous SO question I asked how I change the MySql column type when I have string properties in my POCOs. The answer, that I answered mysel, was to implement my own StringConverter. It was sort ...

Using ServiceStack's OrmLite and decorating a Property with the following attribute, creates a column of type LONGTEXT, instead o TEXT as noted in the docs: But it becomes LONGTEXT: I tried setting ...

When having two classes that has the same name, but in different namespaces, ServiceStacks OrmLite is unable to distinguish between the two. For example: Type type = typeof(FirstNameSpace....

Can OrmLite recognize differences between my POCO and my schema and automatically add (or remove) columns as necessary to force the schema to remain in sync with my POCO? If this ability doesn't ...

How can I properly deserialize POCOs using OrmLite from ServiceStack when I dont know the exact type of the POCO at designtime, but I only get a Type at runtime? So, something like this: // Returns ...

I'm working with an existing WebApi that uses SimpleInjector to register a single database connection. I need to make an endpoint to get info from a different db but I don't know how to register a new ...

AutoQuery could not find field I have the following clases: [Route("/query/domains")] public class QueryDomains : QueryDb<Domain, DomainList> { public int MajesticApiDataTF { get; set; } } ...

I am using servicestack 4.5.14. I want to pass a list of Guid to such as below query. Table Name: Image columns: (Id -> Type=Guid) (ImageId -> Type=Guid) (Guid -> Type=Guid) var result = Db....

UPDATE June 30 This question made a more clean benchmarking, and Mythz found an issue and resolved it: ServiceStack benchmark continued: why does persisting a simple (complex) to JSON slow down ...

So, mythz didnt like my no-so-scientific benchmark question in a previous SO question, but since I would like to switch over to OrmLite, I need to figure out if it is slow, and if so, why. In my "...

In .net core projects I do my seeding inside the Program.cs file like this: var host = BuildWebHost(args); using (var scope = host.Services.CreateScope()) { var services = scope.ServiceProvider; ...

I upgraded to version 5.1.1 of ServiceStack OrmLite (via MyGet), and when I try to open a connection to the db, I suddenly get this error: MySql.Data.MySqlClient.MySqlException: 'The host 127.0.0.1 ...

Anyone know how to apply the correct Alias attribute to query tables with schema names? I have a table called accounts.register. I've tried using [Alias("accounts.register")] as the class decorator ...

I'm a beginner who has just started using ServiceStack.OrmLite. I have a question. How can I get all the objects associated through the intermediate table? details as following: Public class book { ...

How can I get the scalar output from Stored Procedure? When I execute the below statement, it returns DBNull. We are using ServiceStack.OrmLite 4.5.8 var le = db.<<SP Name>>(param1, ...

When joining two tables I get ArgumentNullException: Value cannot be null. Parameter name: key. This happens after executing the query, change any line in Linqpad and execute again. using (var db =...

After reading the documentation, I am not sure but I have come to the conclusion that when creating QueryDb, you cannot choose the columns to join by? And I am under the impression, you must have DTO ...

I have the following POCO class, where Date is defined as a string and will always conform to the following format 'yyyyMMdd' public class Price { [AutoIncrement] public int Id {get;set;} ...

Related tags

Hot questions

Language

Popular Tags