public IHttpActionResult Login(string UserName, string Password) { if (ModelState.IsValid) { var IsValid = _account.getLoginDetail(UserName, Password); if (IsValid == (int)login.notVerifiedYet) { return(Ok("Your registerd mail Id is not verified yet.Kindly Verify Mail-Id.")); } else if (IsValid == (int)login.wrongCredentials) { return(Ok("Incorrect username and password.")); } else { return(Ok(IsValid)); } } return(Ok("Model / Input parameters are not valid")); }