Example #1
0
        public SimpleResponse <List <RentalDto> > ReadAll()
        {
            var response = new SimpleResponse <List <RentalDto> >();

            try
            {
                var resp = iRentalBusiness.ReadAll();

                response.ResponseCode    = resp.ResponseCode;
                response.ResponseMessage = resp.ResponseMessage;
                response.RCode           = resp.RCode;
                response.Data            = SimpleMapper.MapList <RentalViewModel, RentalDto>(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 <RentalDto>();
            return(response);
        }
Example #2
0
        public IHttpActionResult ReadAll()
        {
            var modelResult = iRentalBusiness.ReadAll();

            return(Json(modelResult));
        }
Example #3
0
        public ActionResult Index()
        {
            var response = iRentalBusiness.ReadAll();

            return(View(response.Data));
        }
        public SimpleResponse <List <RentalViewModel> > ReadAll()
        {
            var response = iRentalBusiness.ReadAll();

            return(response);
        }