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