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)); }
public void OnGet(string name) { CurrentGreeting = $"{name} says: {_greetService.GetMessageOfTheDay()} - from Razor Code behind!"; }