- 引用包
<PackageReference Include="Known.EntityFramework" Version="1.0.5" />
- 配置
// EFCore配置
builder.Services.AddKnownEntityFramework(option =>
{
// 配置数据库
option.OnConfig = c => c.UseSqlServer(builder.Configuration.GetSection("ConnString").Get<string>());
// 在此配置业务库数据模型
option.OnModel = m => { };
});