Hello,
Wherein lies the advantage of the first approach getting customer data?
ICustomerService customerService = MyService.GetService<ICustomerService>();
ICustomerList customerList = customerService.GetCustomers();
vs.
ICustomerRepository customerRepo = new CustomerRepository();
ICustomerList customerList = customerRepo.GetCustomers();
If you understand my question you will not ask how the implementation of the MyService class looks like ;-)
here is the implementation of the Repo...
interface ICustomerRepository
{
ICustomerList GetCustomers();
}
class CustomerRepository : ICustomerRepository
{
public ICustomerList GetCustomers()
{...}
}