コード例 #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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void Initialize(int id)
 {
     Person = detailsService.GetDetails(id);
 }
コード例 #4
0
 public async Task <ActionResult <BookDetails> > Get([FromServices] IDetailsService details, int id)
 {
     return(await details.GetDetails(id));
 }