示例#1
0
        public IEnumerable <DetailViewModel> GetDetails()
        {
            var detailViewModels = from det in service.GetDetails()
                                   select new DetailViewModel()
            {
                Id = det.Id, CarID = det.CarID, Name = det.Name
            };

            return(detailViewModels);
        }
示例#2
0
        public IEnumerable <DetailViewModel> GetDetails()
        {
            var details = from detail in detailService.GetDetails()
                          select new DetailViewModel()
            {
                Id = detail.Id, Name = detail.Name
            };

            return(details);
        }
示例#3
0
        public IEnumerable <DetailViewModel> GetDetails()
        {
            var detailViewModels = service.GetDetails().Select(x => new DetailViewModel
            {
                Id    = x.Id,
                Name  = x.Name,
                CarID = x.CarID,
                Price = x.Price
            });

            return(detailViewModels);
        }
示例#4
0
        public IEnumerable <DetailViewModel> GetDetails()
        {
            var details     = detailService.GetDetails();
            var detailsView = details.Select(d => new DetailViewModel
            {
                Id             = d.Id,
                CarId          = d.CarId,
                Name           = d.Name,
                Price          = d.Price,
                DetailTypeId   = d.DetailTypeId,
                ManufacturerId = d.ManufacturerId
            });

            return(detailsView);
        }
示例#5
0
        public ActionResult Details(string filter = null)
        {
            IEnumerable <DetailDTO> detailDTOs = detailService.GetDetails();

            return(View("DetailSearch", filter == null ? detailDTOs : detailService.GetDetails().Where(a => a.NomenclativeCode.Contains(filter)).ToList()));
        }