How to do dependency Injection and conditional object creation based on type?
- by Pradeep
I have a service endpoint initialized using DI. It is of the following style. This end point is used across the app.
public class CustomerService : ICustomerService
{
private IValidationService ValidationService { get; set; }
private ICustomerRepository Repository { get; set; }
public CustomerService(IValidationService…