public void Edit(User model) { using (var unitOfwork = _unitOfWorkFactory.GetCurrentUnitOfWork()) { _userRepository.Edit(model); unitOfwork.Commit(); } }
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(); } }