Ploch.Data.EFCore
4.0.1
dotnet add package Ploch.Data.EFCore --version 4.0.1
NuGet\Install-Package Ploch.Data.EFCore -Version 4.0.1
<PackageReference Include="Ploch.Data.EFCore" Version="4.0.1" />
<PackageVersion Include="Ploch.Data.EFCore" Version="4.0.1" />
<PackageReference Include="Ploch.Data.EFCore" />
paket add Ploch.Data.EFCore --version 4.0.1
#r "nuget: Ploch.Data.EFCore, 4.0.1"
#:package Ploch.Data.EFCore@4.0.1
#addin nuget:?package=Ploch.Data.EFCore&version=4.0.1
#tool nuget:?package=Ploch.Data.EFCore&version=4.0.1
Ploch.Data.EFCore
Core EF Core utilities for the Ploch.Data libraries -- design-time DbContext factory base classes, configurators, data seeding, and value converters.
Key Features
- BaseDbContextFactory<TDbContext, TFactory> -- abstract base for design-time factories with automatic migrations assembly configuration
- IDbContextConfigurator -- abstraction for runtime DbContext configuration (used in DI and integration tests)
- ConnectionString -- helper to read connection strings from
appsettings.json - DataSeeder -- utilities for seeding data into the database
- CollectionStringSplitConverter -- EF Core value converter for storing string collections as delimited strings
Installation
<PackageReference Include="Ploch.Data.EFCore" />
For most applications, use one of the provider-specific packages instead:
Ploch.Data.EFCore.SqLitePloch.Data.EFCore.SqlServer
Quick Start
using Ploch.Data.EFCore;
// Create a design-time factory by inheriting from a provider-specific base
public class MyDbContextFactory : BaseDbContextFactory<MyDbContext, MyDbContextFactory>
{
public MyDbContextFactory() : base(options => new MyDbContext(options)) { }
protected override DbContextOptionsBuilder<MyDbContext> ConfigureOptions(
Func<string> connectionStringFunc,
DbContextOptionsBuilder<MyDbContext> optionsBuilder)
{
return optionsBuilder.UseSqlite(
connectionStringFunc(), ApplyMigrationsAssembly);
}
}
Documentation
See the Data Project Setup Guide for step-by-step instructions and the Architecture Overview for package details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.5)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.5)
- Microsoft.Extensions.Configuration (>= 10.0.5)
- Microsoft.Extensions.Configuration.Json (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.25)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.25)
- Microsoft.Extensions.Configuration (>= 10.0.5)
- Microsoft.Extensions.Configuration.Json (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Ploch.Data.EFCore:
| Package | Downloads |
|---|---|
|
Ploch.Data.EFCore.SqLite
Generic Repository, Unit of Work and Data Utilities |
|
|
Ploch.Data.EFCore.IntegrationTesting
Generic Repository, Unit of Work and Data Utilities |
|
|
Ploch.Data.EFCore.SqlServer
Generic Repository, Unit of Work and Data Utilities |
|
|
Ploch.Data.GenericRepository.EFCore
Generic repository for Entity Framework Core |
|
|
Ploch.Data.GenericRepository.EFCore.SqlServer
Generic Repository, Unit of Work and Data Utilities |
GitHub repositories
This package is not used by any popular GitHub repositories.