I do have added some services to the startup method on Startup.cs.
This service is a Generic service for a specific Type. Here is my startup code:
services.AddTransient<BaseEntityService<Subscription>>();
services.AddTransient<BaseEntityService<Customer>>();
services.AddTransient<BaseEntityService<Asset>>();
services.AddTransient<BaseEntityService<Product>>();
// ...
O my Controller I require the service like:
public MyAssetController(BaseEntityService<Asset> service){ //...
Is there a way to do not repeat the generic service to every class type on the startup? just add a generic type? like this:
services.AddTransient<BaseEntityService>(); // Doesn't works..