public IHttpActionResult SignIn(string login, string password) { if (string.IsNullOrWhiteSpace(login) || string.IsNullOrWhiteSpace(password)) { return(BadRequest("Please, enter login and password")); } else { int userId = UOperations.CheckUser(login, password); if (userId > 0) { return(Ok(userId)); } else { return(BadRequest("Please, check correctness of login and password")); } } }