コード例 #1
0
 public void Edit(User model)
 {
     using (var unitOfwork = _unitOfWorkFactory.GetCurrentUnitOfWork())
     {
         _userRepository.Edit(model);
         unitOfwork.Commit();
     }
 }
コード例 #2
0
 public void Create(User model)
 {
     using (var unitOfwork= _unitOfWorkFactory.GetCurrentUnitOfWork())
     {
         model.Password = Cryptography.Encrypt(model.Password);
         model.LastLoginTime=DateTime.Now;
         _userRepository.Create(model);
         unitOfwork.Commit();
     }
 }