public IActionResult Get(int id) { ModelsAPI.User User = _userRepository.Get(id).DALToAPI(); if (User != null) { return(Ok(User)); } else { return(NotFound()); } }
public IActionResult Login(ModelsDAL.UserALL user) { string PrivateKey = _keyGenerator.PrivateKey; user.Password = decrypting.Decrypt(user.Password, PrivateKey); ModelsAPI.User OneUser = _userRepository.Login(user).DALToAPI(); if (OneUser != null) { return(Ok(OneUser)); } else { return(NotFound()); } }