示例#1
0
        public ResponseGetSplitHouseCatalog GetSplitHouses(RequestGetSplitHouseCatalog request)
        {
            var response = new ResponseGetSplitHouseCatalog(request?.Paging);

            var data = dbManager.GetSplitHouses();

            var result = data.Sorting(request?.Sorting).Pagination(response.Paging).ToList();

            var cData = result.Select(t => new SplitHouseDTO()
            {
                Id = t.Id,
                EnergoEfficienty = t.EnergoEfficienty,
                ImageUrl         = t.ImageUrl,
                Model            = t.Model,
                Noise            = t.Noise,
                Power            = t.Power,
                PowerRealty      = t.PowerRealty,
                Price            = t.Price,
                SizeExternal     = t.SizeExternal,
                SizeInternal     = t.SizeInternal
            }).ToList();

            response.Data = cData;

            return(response);
        }
示例#2
0
 public ResponseGetSplitHouseCatalog GetSplitHouses([FromQuery] RequestGetSplitHouseCatalog request)
 {
     return(ExecuteWrapper.Execute(() => { return aManager.GetSplitHouses(request); }));
 }