【发布时间】:2015-08-30 09:28:01
【问题描述】:
为什么IdentityUser 类在Microsoft.AspNet.Identity.EntityFramework 包中,而不是包含在Microsoft.AspNet.Identity.Core 包中?
为什么要依赖EntityFramework?这似乎是一个简单的类。
我错过了什么?
我通常通过数据层与我的 DAL 分开。为IdentityUser 类添加对EntityFramework 的依赖似乎有点多。
【问题讨论】:
-
@DavidTansey 该帖子显示作者创建了自己的
MyUser类实现IUser接口。作者手动将IdentityUser中的许多典型属性添加到他的自定义类中。人们通常会这样做吗?他们不像 Visual Studio 中的大多数模板那样使用从IdentityUser继承的自定义ApplicationUser类? -
@IssaFram:如果您不想依赖 EntityFramework,那就必须这样做。在page 的底部有一个提供者 EF free 的实现列表。
标签: c# asp.net .net entity-framework asp.net-identity-2