Reputation: 272
I saw some commits for ServiceStakck ORMLite for .NET Core specifically this
Can we try it right now or it is just nuget spec update? I am looking to integrate ServiceStack ORMLite for .Net core project (ServiceStack.OrmLite.PostgreSQL.Core).
Upvotes: 1
Views: 1793
Reputation: 143319
All of OrmLite's supported packages contains both .NET Framework v4.5 and .NET Standard 2.0 builds which can be used in both .NET Framework and .NET Core projects which can be used like normal:
public class Person
{
[AutoIncrement]
public int Id { get; set; }
public string Name { get; set; }
}
public class Program
{
public static string PostgreSqlDb = "{Connection String}";
public static void Main(string[] args)
{
var dbFactory = new OrmLiteConnectionFactory(
PostgreSqlDb, PostgreSqlDialect.Provider);
using (var db = dbFactory.Open())
{
db.DropAndCreateTable<Person>();
5.Times(i => db.Insert(new Person { Name = "Name {i}" }));
var results = db.Select<Person>();
results.PrintDump();
}
Console.ReadLine();
}
}
Upvotes: 2
Reputation: 4302
As say in NuGet package's details page, you can use it with .Net Core with at least .NETStandard 1.3.
But if you look into the latest release note. They say :
Just like the other .NET Core libraries .NET Core builds of ServiceStack.Redis is released with a *.Core suffix until development of .NET Core has stabilized.
Upvotes: 0