public IActionResult Index()
        {
            var allCats = new AllCatsViewModel
            {
                Cats = this.context.Cats.ToList()
            };

            return(this.View(allCats));
        }
示例#2
0
        public IActionResult Index()
        {
            AllCatsViewModel allCats = new AllCatsViewModel()
            {
                Cats = _catService.GetAllCats()
            };

            return(View(allCats));
        }