Exemplo n.º 1
0
        public IActionResult Index()
        {
            var model = new IndexViewModel
            {
                Restaurants     = _restaurantData.GetAll(),
                MessageOfTheDay = _greetService.GetMessageOfTheDay()
            };

            return(View(model));
        }
        public IViewComponentResult Invoke()
        {
            var model = _greetService.GetMessageOfTheDay();

            return(View("Default", model));
        }
Exemplo n.º 3
0
 public void OnGet(string name)
 {
     CurrentGreeting = $"{name} says: {_greetService.GetMessageOfTheDay()} - from Razor Code behind!";
 }