public IActionResult Detail(int rentalId) { var response = iRentalBusiness.Read(rentalId); if (response.Data == null || response.ResponseCode < 1) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } return(View(response.Data, JsonRequestBehavior.AllowGet)); }
public ActionResult Detail(int rentalId) { var response = iRentalBusiness.Read(rentalId); if (response.Data == null || response.ResponseCode < 1) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } return(View(response.Data)); }
public SimpleResponse <RentalDto> Read(int rentalId) { var response = new SimpleResponse <RentalDto>(); try { var resp = iRentalBusiness.Read(rentalId); var isNullOrDef = resp.Data == null || resp.Data == default(RentalViewModel); response.ResponseCode = isNullOrDef ? BusinessResponseValues.NullEntityValue : 1; response.RCode = resp.RCode; response.ResponseMessage = resp.ResponseMessage; if (!isNullOrDef) { response.Data = SimpleMapper.Map <RentalViewModel, RentalDto>(resp.Data); } } catch (Exception ex) { response.ResponseCode = BusinessResponseValues.InternalError; response.ResponseMessage = "Okuma iþleminde hata oluþtu."; SimpleFileLogger.Instance.Error(ex); } return(response); }
public IHttpActionResult Detail(int rentalId) { var modelResult = iRentalBusiness.Read(rentalId); return(Json(modelResult)); }
public SimpleResponse <RentalViewModel> Detail(int rentalId) { var response = iRentalBusiness.Read(rentalId); return(response); }