I'm in the process of evaluating DevForce for Silverlight.
In my EF model i have a direct many to many relation between two classes.(without having a intermidiate class, no payload)
I kept getting an exception :
object reference not set to an instance of an object at IdeaBlade.EntityModel.EntityReferenceBase.get_PropertyName()
in my Silverlight client when i wanted to display a master detail between the above classes.
So i started up a project with a NorthwindIB model which also has a many to many relationship between Employee and Territory without payload.
Showing a master detail between the Employee and Territory didnt give my any problems, so i wonderd why it didnt work in my model ?
In my model i wanted to "hide" navigation to lets say from Territory to Employee so i deleted the navigation property from Territory to Employees in EF. I reproduced that step in the Northwind model and indeed the object reference not set was thrown again in the Silverlight client. After fixing the model with adding the navigation property back to the Territory class i decided to set the Getter and Setter for that navigation attribute to Employee in the EF model to private and later on protected. Testing the master/detail Silverlight client now throws an EntityServerException:
Attempt by method 'DynamicClass.ReadTerritoryFromXml(System.Runtime.Serialization.XmlReaderDelegator, System.Runtime.Serialization.XmlObjectSerializerReadContext, System.Xml.XmlDictionaryString, System.Xml.XmlDictionaryString)' to access method 'DevForceNW.Territory.get_Employees()' failed.
So im not sure how to hide the navigation from one end of a many to many relation now.
Any help, advice, best practice are welcome.
Excuse me if my english isnt correct.
TIA, Nico Schoemaker.