How to Consume WCF services in MVVM
Dear All,
I have went through the book [Read Word .net c# and Siverlight 15 mvps].
The book was really superb, i have implemented a mvvm pattern and i am trying to consume wcf services in view model usin below code
private readonly ICustomerServiceAgent customerServiceAgent;
private string status;
private ObservableCollection<Customer> customers;
[ImportingConstructor]
public HelloWorldViewModel(ICustomerServiceAgent serviceAgent)
{
this.customerServiceAgent = serviceAgent;
this.LoadCustomersCommand = new DelegateCommand(this.LoadCustomers, this.CanLoadCustomers);
this.status = "Ready";
}
..................
Error:ResolutionfailedException...........
Resolution of the dependency failed type= viewmodel= none.........
ICustomerServiceAgent interface connot be constructed
Please suggest how to solve error and consume wcf service in mvvm sample code.......chapter 7 mvvm framework
Last edited by Hambeere; January 23rd, 2012 at 04:57 AM..
Reason: add chapter name
|