SQL Server provider package for Ploch.Data -- includes a design-time factory and runtime configurator.
- SqlServerDbContextFactory<TDbContext, TFactory> -- one-line design-time factory for SQL Server
- SqlServerDbContextConfigurator -- runtime configurator for DI and testing
<PackageReference Include="Ploch.Data.EFCore.SqlServer" />using Ploch.Data.EFCore.SqlServer;
public class MyDbContextFactory()
: SqlServerDbContextFactory<MyDbContext, MyDbContextFactory>(
options => new MyDbContext(options));{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=MyApp;Integrated Security=True;TrustServerCertificate=True"
}
}See the Data Project Setup Guide for full provider project setup.