Exemplo n.º 1
0
        public ActionResult Index()
        {
            var data  = _plasticService.GetAllIncludingLocation();
            var model = data.Select(x => new PlasticViewModel(x)).ToList();

            return(View(model));
        }
Exemplo n.º 2
0
        public async Task <PartialViewResult> LoadForm(int?id)
        {
            var plastics = _plasticService.GetAllIncludingLocation().ToList();

            return(PartialView("_Modal", id == null ? new PlasticSpoolViewModel(plastics) : new PlasticSpoolViewModel(await _plasticSpoolService.Get(new EntityDto((int)id)), plastics)));
        }