public Resources.User MapToPresentationModel() { Resources.User temp = new Resources.User(); temp.IdUser = this.IdUser; temp.Email = this.Email; temp.IsActive = this.IsActive; temp.LastName = this.LastName; temp.Name = this.Name; temp.Password = this.Password; return(temp); }
public async Task <IActionResult> LogIn(Resources.User user) { var temp = await userRepository.GetByEmail(user.Email); if (temp != null) { if (temp.Password.Equals(user.Password)) { return(Ok(_mapper.Map <Resources.User>(temp))); } else { return(NotFound(user)); } } else { return(NotFound(user)); } }