public IActionResult Index() { CounterService.Increment(); var count = CounterService.GetCount(); var msg = ImportantBusiness.GetGreetingMessage(); return(View(new GreetingViewModel(msg.Message, count))); }
public WelcomePageViewModel(ICounterService counterService, IEventAggregator eventAggregator) { WelcomeText = "Welcome Guy"; AddCountCommand = new DelegateCommand(Increment, CanExecuteAddCommand).ObservesProperty(() => Amount); this.counterService = counterService; this.eventAggregator = eventAggregator; this.Count = counterService.GetCount(); }
public StatusPageViewModel(ICounterService counterService, IEventAggregator eventAggregator, INavigationService navigationService) { Counter = counterService.GetCount(); this.eventAggregator = eventAggregator; this.navigationService = navigationService; }
public int GetCount() { return(_counterService.GetCount()); }