public IHttpActionResult GetAuthentication(User user, string apiKey) { if (!ModelState.IsValid) { return(Content(HttpStatusCode.BadRequest, "BadRequest")); } var userDb = UsersLogic.GetAuthentication(user, apiKey); if (userDb == null) { return(Content(HttpStatusCode.NotFound, "NotFound2")); } return(Content(HttpStatusCode.OK, userDb)); }