public IHttpActionResult CheckIfUserNameExist(string userName) { UsersLogic users = new UsersLogic(); var result = users.CheckIfUserNameExist(userName); if (result == 1) { return(Ok(result)); } else { return(NotFound()); } }