I have a WPF application, and I need to make it show a ‘Login’ window on startup, and then connect to a WCF service with credentials passed from the user.
Question is – where does the actual ‘client.Open()’ happen ?
in the ViewModel or in the Model ?
I think it should happen in a seperate class, but should be called by the ViewModel or the Model.
Which one is it ?
Hi yes I totally misunderstood your question am sorry for that . Its like When user click Login button on UI ,Corresponding to that Command of that Button is fired and ViewModel method for Login is invoked that method further Calls the Clientside Service class(Model) method which further calls ServerSide Service class method which further calls BLL method Which further calls Repository method of Login.The chain is like View=> VM => ClientSideService=>ServerSideService=>BLL=>Repository. However you can skip ClientSide Service if you want to or can call ServerSide Service directly from ViewModel.Answer of “but should be called by the ViewModel or the Model?” is that they are called Model.I hope this will help