- July
Posted By : Alexander Goida
Error: Unable to determine the principal end of an association between the types

You may get this error if you have entities related to itself. For example, you have a tree hierarchy.

The same entity may have references to its parent. In such case when you execute the query the error is appeared.The simplest class that can raise the exception.

If you try to query the entity and include the root you’ll catch the exception.

In order to get rid of the exception you should change the entity as follows:

This will help to find principal in the relationship and execute the query.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.