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