Esempio n. 1
0
        public IEnumerable <DetailViewModel> GetDetails()
        {
            var detailViewModel = service.GetDetails().Select(x => new DetailViewModel {
                Id = x.Id, CarId = x.CarId, Name = x.Name
            });

            return(detailViewModel);
        }
        public IEnumerable <DetailViewModel> GetDetails()
        {
            var detailViewModel = from det in service.GetDetails()
                                  select new DetailViewModel()
            {
                Id = det.Id, Cars_Id = det.Cars_Id, Name = det.Name
            };

            return(detailViewModel);
        }
Esempio n. 3
0
 public void Initialize(int id)
 {
     Person = detailsService.GetDetails(id);
 }
Esempio n. 4
0
 public async Task <ActionResult <BookDetails> > Get([FromServices] IDetailsService details, int id)
 {
     return(await details.GetDetails(id));
 }