We will be developing a large enterprise desktop application very soon, and I spent some time exploring the WPF + PRISM + MVVM approach, I have a good understanding of most of the concepts, and I love the modularity that it provides.
In case of problems, the question arises of how to archive the service layer for data input and output, especially when this service is introduced by the module with the idea that the dependent module can use it.
I wanted to divert my WCF data services from within application services and use ServiceLocator to resolve specific instances from my view models, however, itโs hard for them to find how this should hang together, mainly because of my authority as part of the WCF service.
for example
Module1 Contains WCF service + Specific application service (ISearchService) + generated WCF service objects (model)
Module1.Infast structure . Contains the following interface for application services.
public interface ISearchService { ObservableCollection<Person> Search(string search); }
this will be registered with UnityContainer so that any other module can get the specific implementation imposed by the module.
My problem is that Entities ( Person ) are defined in the module itself (in the WCF service), therefore, presenting the service and then expecting that any other modules will be able to use it, they should refer to the module by itself, not only the module infrastructure, if I do not pull the services to another assembly.
Should I expose my rights that are automatically generated from my EF model in this way?
Does anyone have a better solution?
Richard Friend
source share