public IHttpActionResult AddCountry(ACRF_CountryModel objModel) { string result = ""; if (ModelState.IsValid) { try { objModel.CreatedBy = GlobalFunction.getLoggedInUser(Request.Headers.GetValues("Token").First()); result = objCountryVM.CreateCountry(objModel); } catch (Exception ex) { ErrorHandlerClass.LogError(ex); result = ex.Message; } } else { result = "Enter Valid Mandatory Fields"; } return(Ok(new { results = result })); }