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