public SimpleResponse <FilmActorDto> Create(FilmActorDto dto) { var response = new SimpleResponse <FilmActorDto>(); try { var model = SimpleMapper.Map <FilmActorDto, FilmActorViewModel>(dto); var resp = iFilmActorBusiness.Create(model); response = new SimpleResponse <FilmActorDto>() { ResponseCode = resp.ResponseCode, ResponseMessage = resp.ResponseMessage, RCode = resp.RCode }; 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 IHttpActionResult CreatePost(FilmActorViewModel model) { var response = new SimpleResponse <FilmActorViewModel>(); response = iFilmActorBusiness.Create(model); return(Json(response)); }
public ActionResult CreatePost(FilmActorViewModel model) { var response = iFilmActorBusiness.Create(model); if (response.ResponseCode > 0) { return(RedirectToAction("Index")); } else { ModelState.AddModelError(string.Empty, response.ResponseMessage); return(View("Create", model)); } }
public SimpleResponse <FilmActorViewModel> Create(FilmActorViewModel model) { var response = iFilmActorBusiness.Create(model); return(response); }