Is this a general and / or good approach?
In my ViewModel (Wpf) or Presenter (WinForms) I do this:
ICustomerService customerService = MyService.GetService<ICustomerService>(); ICustomerList customerList = customerService.GetCustomers();
The CustomerService class is as follows:
public class CustomerService : ICustomerService { public ICustomerList GetCustomers() { return _customerDataProvider.GetCustomers(); } } public class CustomerDataProvider() { public ICustomerList GetCustomers() {
c # sql service data-access-layer dataprovider
msfanboy
source share