21 lines
530 B
C#
21 lines
530 B
C#
using LinqToDB.Data;
|
|
using LinqToDB.DataProvider;
|
|
using Pechka.AspNet.Database;
|
|
|
|
namespace Keroosha.Pechka.Web.Database;
|
|
|
|
public class AppDbContext : DataConnection
|
|
{
|
|
public AppDbContext(string connectionString, IDataProvider provider) : base(provider, connectionString)
|
|
{
|
|
}
|
|
}
|
|
|
|
public class AppDbContextManager : DbContextManagerBase<AppDbContext>
|
|
{
|
|
public AppDbContextManager(IDataProvider provider, string connectionString):
|
|
base(() => new AppDbContext(connectionString, provider))
|
|
{
|
|
|
|
}
|
|
} |