public IActionResult Detail(int filmId, int categoryId) { var response = iFilmCategoryBusiness.Read(filmId, categoryId); if (response.Data == null || response.ResponseCode < 1) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } return(View(response.Data, JsonRequestBehavior.AllowGet)); }
public SimpleResponse <FilmCategoryDto> Read(int filmId, int categoryId) { var response = new SimpleResponse <FilmCategoryDto>(); try { var resp = iFilmCategoryBusiness.Read(filmId, categoryId); var isNullOrDef = resp.Data == null || resp.Data == default(FilmCategoryViewModel); response.ResponseCode = isNullOrDef ? BusinessResponseValues.NullEntityValue : 1; response.RCode = resp.RCode; response.ResponseMessage = resp.ResponseMessage; if (!isNullOrDef) { response.Data = SimpleMapper.Map <FilmCategoryViewModel, FilmCategoryDto>(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 <FilmCategoryViewModel> Detail(int filmId, int categoryId) { var response = iFilmCategoryBusiness.Read(filmId, categoryId); return(response); }
public IHttpActionResult Detail(int filmId, int categoryId) { var modelResult = iFilmCategoryBusiness.Read(filmId, categoryId); return(Json(modelResult)); }