コード例 #1
0
        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);
        }
コード例 #2
0
        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 }));
            }
        }
コード例 #3
0
        public SimpleResponse Delete(int countryId)
        {
            var result = iCountryBusiness.Delete(countryId);

            return(result);
        }
コード例 #4
0
        public IHttpActionResult Delete(int countryId)
        {
            var result = iCountryBusiness.Delete(countryId);

            return(Json(result));
        }