[英]How to use Identity with Entity Framework database first in ASP.NET MVC
When I try to use Identity with EF database first , I get the following error 当我尝试首先将Identity与EF 数据库一起使用时,出现以下错误
Missing partial modifier on declration of type 'MyProject.Models.UserProfile' another partial declration of this type exist. 类型'MyProject.Models.UserProfile'的偏斜缺少部分修饰符,此类型的另一部分偏斜存在。
Basically I get this error because there is a partial class
called UserProfile
that exist in AccountModel
class and another class
with the same name that represent the Table
generated using Identity . 基本上,我得到这个错误,因为有一个partial class
称为UserProfile
中存在的AccountModel
类和其他class
与代表相同的名称Table
使用Identity生成。
So what should I do? 所以我该怎么做?
确保定义的两个类都使用“部分”修饰符。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.