Пример #1
0
 internal ServiceResult <User> PasswordSignIn(string userName, string password)
 {
     return(FMPTDbContext.DelegateNonTransaction(c =>
     {
         var user = UserRepository.GetByUserNameAndPassword(userName, password.ToMD5());
         if (user == null)
         {
             throw new NotImplementedException("用户不存在或密码错误");
         }
         return user;
     }));
 }
Пример #2
0
 internal ServiceResult <User> GetUserInfo(long userId)
 {
     return(FMPTDbContext.DelegateNonTransaction(c =>
     {
         var user = UserRepository.GetById(userId);
         if (user == null)
         {
             throw new NotImplementedException("用户不存在");
         }
         return user;
     }));
 }