コード例 #1
0
        // GET: Types
        public ActionResult Index()
        {
            TypeIndexViewModel typeIndexViewModel = new TypeIndexViewModel();

            typeIndexViewModel.Types = db.Types.ToList();
            return(View(typeIndexViewModel));
        }
コード例 #2
0
        public IActionResult Types()
        {
            var model = new TypeIndexViewModel
            {
                Types = _modelFetcher.GetAllTypeViewModels()
            };

            return(View(model));
        }