Ejemplo n.º 1
0
 public int CreateUser(UserEntity user,string email)
 {
     if (unitOfWork.AuthorizationRepository.Get(x=>x.Email == email) == null)
     {
         unitOfWork.UserRepository.Create(user.ToDataTransferUser());
         unitOfWork.Save();
         var userId = unitOfWork.UserRepository.Get(x => x.UserName == user.UserName).Id;
         unitOfWork.AchievementRepository.Create(userId);
         return userId;
     }
     return 0;
 }
Ejemplo n.º 2
0
 public void DeleteUser(UserEntity user)
 {
     unitOfWork.UserRepository.Delete(user.ToDataTransferUser());
     unitOfWork.Save();
 }