public HomeController(IIndexViewModel indexViewModel)
 {
     _indexViewModel = indexViewModel;
 }
Пример #2
0
        // For some good IoC and DI reference:
        // https://docs.microsoft.com/en-us/aspnet/signalr/overview/advanced/dependency-injection

        public IndexHub(IIndexViewModel viewModel)
        {
            // Any data can be injected.  Wanted to keep this simple so stick with the ONE ViewModel.

            _indexViewModel = viewModel;
        }