public SimpleResponse <FilmCategoryDto> Create(FilmCategoryDto dto) { var response = new SimpleResponse <FilmCategoryDto>(); try { var model = SimpleMapper.Map <FilmCategoryDto, FilmCategoryViewModel>(dto); var resp = iFilmCategoryBusiness.Create(model); response = new SimpleResponse <FilmCategoryDto>() { ResponseCode = resp.ResponseCode, ResponseMessage = resp.ResponseMessage, RCode = resp.RCode }; 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 Delete(FilmCategoryDto dto) { var response = new SimpleResponse(); try { var model = SimpleMapper.Map <FilmCategoryDto, FilmCategoryViewModel>(dto); response = iFilmCategoryBusiness.Delete(model); } catch (Exception ex) { response.ResponseCode = BusinessResponseValues.InternalError; response.ResponseMessage = "Silme iþleminde hata oluþtu."; SimpleFileLogger.Instance.Error(ex); } return(response); }