我正在使用实体框架6.1.3、ASP.NET标识实体框架2.2.1和ASP.NET MVC5项目中的Oracle12C。
当我试图使用Nuget命令生成数据库时:-
Enable-Migrations
我得到了下面的例外
'System.Data.Entity.Migrations.DbMigrationsConfiguration1' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.Entity.Inte
假设我有以下课程:
public class MyClass<T>
{
public MyClass() {
//construct logic
}
public IProperty<T> MyProperty { get; set; }
}
public interface IProperty<T> { }
public DateTimeProperty : IProperty<DateTime>
{
}
如果我尝试将这些代码放入MyClass的构造函数中
if (typeof(T) == typ