Eld*_*dho 7 entity-framework asp.net-identity
public EmployeeDTO AuthenticateEmployee(string username, string password)
{
try
{
var userLogin = UnitOfWork.UserLoginRepository.Get(x => x.UserName == username).FirstOrDefault();
if (userLogin == null)
return null;
else
{
var userStore = new UserStore<IdentityUser>();
var userManager = new UserManager<IdentityUser>(userStore);
// this throws an error.
var user = userManager.Find("username", "password");
}
}
}
Run Code Online (Sandbox Code Playgroud)
结果有误:
无法从程序集'EntityFramework,Version = 6.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'加载类型'System.ComponentModel.DataAnnotations.Schema.IndexAttribute'.
我使用的是EF 6.0,Microsoft.AspNet.Identity.EntityFrameworkVer 2.0.
我无法使用EF执行任何操作使用Identity我有什么需要做的,我的EDMX在另一个类库中.我认为这是一个DLL问题.
请帮我使用EF的身份.
我已经通过了Msdn
| 归档时间: |
|
| 查看次数: |
3493 次 |
| 最近记录: |