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); }
public IEnumerable <DetailViewModel> GetDetails() { var details = from detail in detailService.GetDetails() select new DetailViewModel() { Id = detail.Id, Name = detail.Name }; return(details); }
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); }
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); }
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())); }