ASP.NET Core MVC FromService binding in Controller returns empty collection
问题 Been trying to get a grip of ASP.NET Core MVC but got stuck with dependency injection returning empty collection in my controller action, despite of registering the service as Singleton in ConfigureService method. Tried two different ways to register but only one of them actually works. Said method is as following: public void ConfigureServices(IServiceCollection services) { // Add framework services. services.AddMvc(); /***THIS DOES NOT WORK***/ services.AddSingleton<IRepository<Employee>,