public Response <string> Login(LoginUserModel userModel) { if (userModel == null) { return new Response <string> { Value = null, ErrorCode = (int)ErrorEnum.Aplied, ErrorMessage = "Пустой запрос" } } ; var createResult = _userContext.LoginUser(userModel.Login, userModel.Password); return(new Response <string> { Value = createResult.key, ErrorCode = createResult.result == 1 ? (int)ErrorEnum.Ok : (int)ErrorEnum.Aplied, ErrorMessage = createResult.errormessage }); } }