示例#1
0
        public GetCentersResponse GetCenters(IList <Sort> sort)
        {
            GetCentersResponse response = new GetCentersResponse();

            try
            {
                Response <Center> centers = _centerRepository.FindAllWithSort(-1, -1, sort);


                response.CenterViews = centers.data.ConvertToCenterViews();
            }
            catch (Exception ex)
            {
                throw;
            }

            return(response);
        }
示例#2
0
        public GetCentersResponse GetCenters()
        {
            GetCentersResponse response = new GetCentersResponse();

            try
            {
                IEnumerable <CenterView> centers = _centerRepository.FindAll()
                                                   .ConvertToCenterViews();

                response.CenterViews = centers;
            }
            catch (Exception ex)
            {
                throw;
            }

            return(response);
        }