Exemplo n.º 1
0
        public IActionResult Index()
        {
            var flowers = flowerRepository
                          .GetAllFlowers()
                          .OrderBy(f => f.Name);

            var homeViewModel = new HomeViewModel()
            {
                Title   = "Welcome to flower shop!",
                Flowers = flowers.ToList()
            };

            return(View(homeViewModel));
        }