0
有没有什么办法可以在.net core中使用DbConfiguration? 对于前:如何在ASP.NET Core中使用DbConfiguration类
public class DbConfig : DbConfiguration
{
public DbConfig()
{
SetProviderServices("System.Data.SqlClient",
System.Data.Entity.SqlServer.SqlProviderServices.Instance);
}
}
我认为我需要得到一个.NET Framework DLL,为了使用该类引用它在我的项目?我这样做的目的是把一个注释上的DbContext类象下面这样:
[DbConfigurationType(typeof(DbConfig))]
public class MyDbContext : DbContext
在.NET的核心方式
,并最终实现this。