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