ormlite-servicestack Questions

2

I've created a repository with a complete example of what I'm trying to do. I have the following schema: class Order { public int OrderId { get; set; } } class LineItem { public int LineItemId...
Amplify asked 2/10, 2017 at 22:59

6

Solved

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 e...
Harem asked 3/1, 2013 at 15:57

4

How can I create a column in a table and specify it as varchar(max) when using servicestack ormlite? Currently I execute some sql after the table create to get what I want. I've seen the StringLe...
Bine asked 20/6, 2013 at 11:51

3

Solved

I have to call a Stored Procedure but passing a datatable (an iEnumerable) as parameter. My SP on the SQL server takes this parameter as: @LIST_USERS dbo.LIST_USERINFO_TYPE READONLY and the typ...
Turpin asked 13/11, 2013 at 12:2

1

Solved

Following on from this comment, how can I do a ServiceStack OrmLite query that joins two or more tables and returns some of the columns from each of them? Using the OrmLite Does_only_populate_Sele...
Vasques asked 25/5, 2016 at 16:3

1

Solved

I'd like to do a simple SQL join in ServiceStack OrmLite and get both tables as the corresponding .NET objects. In LINQ-to-Entities it would be something like this: Claim.Join(Policy, c => c.P...
Sikang asked 24/5, 2016 at 14:23

1

How do I define a postgis 'geography' type in my C# class model so that OrmLite can easily pass it through to Postgresql so I can run spatial queries in addition to saving spatial data to the 'geog...
Cheerleader asked 27/6, 2013 at 13:3

2

Solved

Due to my error message: An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code Additional information: Conversion failed when con...
Credential asked 20/12, 2013 at 20:53

2

Solved

I am looking for a good way to implement paging in ormlite and I found another question, which has this snippet: var data = db.Select<address>(predicate).Skip((int) pageNumber).Take((int) pa...
Pallium asked 16/9, 2013 at 9:34

1

I'm facing a weird problem with the deployment of a referenced library (ServiceStack.OrmLite) during Web project publishing. It was working fine until last week or so, and now suddenly some Service...
Kowtow asked 9/10, 2013 at 0:12

2

Solved

I'm trying to implement the Repository pattern using ORMLite. I initially started off with: public List<Todo> GetByIds(long[] ids) { using (IDbConnection dbConn = dbFactory.OpenDbConnection...

1

I just learned about a genius type that would simplify a lot of my work but it looks like my preferred ORM does not recognize it. Is there a workaround to let ServiceStack OrmLite recognize Hierar...
Primateship asked 17/2, 2013 at 17:56

1

Solved

I have table structures that look like below: table Tenant: Id[PK], etc table Contact: Id[PK], FirstName, LastName etc table Sale: Id[PK], TenantId[FK], SellerId[FK], BuyerId[FK], etc SellerId is...
Kira asked 19/1, 2015 at 7:6

2

Solved

I just installed OrmLite (for MySql) via NuGet in Visual Studio 2012. The installation passes without any errors, and all DLL:s seem to be added as reference: ServiceStack.Common (3.9.70.0) Serv...
Hollingsworth asked 9/11, 2013 at 22:57

1

Solved

I am using ServiceStack OrmLite SqlServer v3.9.71 and have the following connection string: <add key="ConnStr" value="Data Source=my-db;Initial Catalog=Users;Integrated Security=SSPI;Connection...

2

Solved

how can i have nText datatype in ServiceStack.OrmLite Code first ? public class Email { [AutoIncrement] public long ID { get; set; } public DateTime Date { get; set; } public string From { ...
Disposable asked 1/7, 2012 at 11:52

0

I have an SQL Server table Employee with a column EntryDate defined as DATETIME. I also have the following poco: public class Employee { public int Id {get; set;} public DateTime EntryDate {get...
Iong asked 18/8, 2014 at 15:50

1

Hi i'm running ServiceStack with Ormlite and I encountered this error. Previously it is working fine. I'm not sure what I have changed that caused this error. I just used a simple db.Select() call ...
Vaticination asked 28/7, 2014 at 8:17

1

Solved

I have 3 tables of same structure so i have created the following entity using ServiceStack public class GenericEntity { [Alias("COL_A")] public string ColumnA { get; set; } } For retriving th...
Cesarcesare asked 25/7, 2014 at 12:16

1

Solved

I am writing a custom PRAGMA to my SQLite db file using the below code: using (var db = GetNewConnection()) { var version = "1234"; var query = string.Format("PRAGMA user_version={0}", version);...
Indulgent asked 21/7, 2014 at 14:36

3

Solved

For a table that has an identity: [AutoIncrement] public int Id { get; set;} When inserting a new row into the database, what is the best way to retrieve the Id of the object? For example: ...
Wakerife asked 13/1, 2013 at 16:4

2

Solved

After I create and commit a transaction in SQLite through ServiceStack's OrmLite I cannot go on and issue any queries. For example, the following test fails: [Test, Explicit] public void Can_qu...
Poultice asked 20/3, 2013 at 17:28

2

I was wondering if ORMLite had a QueryMultiple solution like dapper. My use case is in getting paged results. return new { Posts = conn.Select<Post>(q => q.Where(p => p.Tag == "Chris...
Hermitage asked 9/5, 2013 at 15:15

1

Solved

It seems like OrmLite Select(predicate) function it brings back everything in the where clause (across the network) and then applies the .Take(x) on top of that. I need a way to only bring back th...
Catabolism asked 11/2, 2014 at 4:39

1

This is entity framework: var department = _context.Departments .Include(dep => dep.Employees.Select(emp => emp.ContactTypes)) .SingleOrDefault(d => d.Id == departmentId); Here I expe...
Humiliate asked 17/12, 2013 at 22:23

© 2022 - 2024 — McMap. All rights reserved.