Clara's Notes on Technology
Notes to me and the world

WCF

Many-to-many relationships & Object graph cycles

Suppose you have three tables in your database where one of them specifies a many-to-many relationship between the other two (example from AdventureWorks): Suppose also that you have a method such as GetVendors(int productID) that will retrieve all the vendors for a given product through the ProductVendors table (that is , the many-to-many table). Now, if this method is exposed via a WCF service, when your client calls it you will see an exception like this one: "System.ServiceModel.Commun...

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati