When trying to retrieve data for reflexive relationship I was getting the exception which is the title of this post. How I was able to fix the same was by just using once line of code as below which will mention whether the role is referencing or referenced.
relationship.PrimaryEntityRole = EntityRole.Referencing;
where relationship is the object Relationship.
Hope this helped someone. !!!
No comments:
Post a Comment