public SimpleResponse Delete(CountryDto dto) { var response = new SimpleResponse(); try { var model = SimpleMapper.Map <CountryDto, CountryViewModel>(dto); response = iCountryBusiness.Delete(model); } catch (Exception ex) { response.ResponseCode = BusinessResponseValues.InternalError; response.ResponseMessage = "Silme iþleminde hata oluþtu."; SimpleFileLogger.Instance.Error(ex); } return(response); }
public IActionResult DeletePost(int countryId) { var response = iCountryBusiness.Delete(countryId); if (response.ResponseCode > 0) { return(RedirectToAction("Index")); } else { ModelState.AddModelError(string.Empty, response.ResponseMessage); return(RedirectToAction("Delete", new { countryId })); } }
public SimpleResponse Delete(int countryId) { var result = iCountryBusiness.Delete(countryId); return(result); }
public IHttpActionResult Delete(int countryId) { var result = iCountryBusiness.Delete(countryId); return(Json(result)); }