public ActionResult Login([FromBody] UserCredentialsDto value) { try { if (repo.GetUser(value.Username, value.Password) != default(User)) { return(Ok()); } return(Unauthorized()); }catch (Exception ex) { return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message)); } }