Reputation: 3
I have a class
CartIndexViewModel
in my project SportsStore. I am making calls to WCF service so I want to pass an Object of CartIndexViewModel so I copied the required .dll files in the WCF Project but its conflicting as it says there is a type mismatch.
SportsStore.WebUI.ServiceReference.CartIndexViewModel SportsStore.WebUI.Models.CartIndexViewModel
both the classes are same, have same properties and methods but in different project how can i pass an object from sending side i.e SportsStore.WebUI.Models.CartIndexViewModel and the receiving end i.e. SportsStore.WebUI.ServiceReference.CartIndexViewModel receive the object. I dont have much knowledge i tried doing a lot of homework on this but couldn't get a solution. Please help. Thank you.
Upvotes: 0
Views: 75
Reputation: 151588
First add a reference to the library, then generate the service reference. Make sure "Reuse types" is checked.
Upvotes: 2