コード例 #1
0
        public SimpleResponse <List <FilmCategoryDto> > ReadAll()
        {
            var response = new SimpleResponse <List <FilmCategoryDto> >();

            try
            {
                var resp = iFilmCategoryBusiness.ReadAll();

                response.ResponseCode    = resp.ResponseCode;
                response.ResponseMessage = resp.ResponseMessage;
                response.RCode           = resp.RCode;
                response.Data            = SimpleMapper.MapList <FilmCategoryViewModel, FilmCategoryDto>(resp.Data);
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Okuma iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            response.Data = response.Data ?? new List <FilmCategoryDto>();
            return(response);
        }
コード例 #2
0
        public SimpleResponse <List <FilmCategoryViewModel> > ReadAll()
        {
            var response = iFilmCategoryBusiness.ReadAll();

            return(response);
        }
コード例 #3
0
        public IHttpActionResult ReadAll()
        {
            var modelResult = iFilmCategoryBusiness.ReadAll();

            return(Json(modelResult));
        }
コード例 #4
0
        public IActionResult Index()
        {
            var response = iFilmCategoryBusiness.ReadAll();

            return(View(response.Data));
        }