예제 #1
0
 public Task <AspNetUser> FindAsync(string userName, string password)
 {
     return(Task <AspNetUser> .Factory.StartNew(() =>
     {
         using (AspNetUserRepository repository = new AspNetUserRepository())
         {
             //repository.LazyLoadingEnabled = false;
             repository.ProxyCreationEnabled = false;
             password = PasswordHasher.HashPassword(password);
             var result = repository.GetSingle(user => user.UserName == userName && user.Password == password, user => user.AspNetUserClaim, user => user.AspNetUserClaim);
             //return result;
             return (AspNetUser)DeepCopy.CloneInternal(result, 2);
         }
     }));
 }