public async Task <User> InsertUserAsync(User user) { if (user == null) { throw new ArgumentNullException("User"); } try { user.Password = MulakatHelper.HashPassword(user.Password).ToString(); await userRepo.Insert(user); await SaveAsync(); return(user); } catch (Exception) { throw; } }
public async Task <User> GetUserAsync(string eMail, string password) { password = MulakatHelper.HashPassword(password).ToString(); return(await userRepo.GetAsync(u => u.Email == eMail && u.Password == password)); }