I am just starting with Entity Framework and have the following problem:
I have a Site entity which contains a navigation property Paragraphs.
I have multiple entities (i.e. ImageParagraph, LinkListParagraph) that should be inherited form Paragraph.
I would like to query for a Site object and access its Paragraphs and work with them depending on their concrete type (i.e. ImageParagraph, LinkListParagraph).
It would work with a Table Per Hierarchy approach (with conditions), but then i would end up in a very dirty solution. Querying for the concrete type based on the Paragraph ID would work, but I hope there is a way better solution.
I want to query for a Site and show some Site specific data and the data in the Paragraphs (ImageParagraph, LinkListParagraph). I do not know how to set up the mapping in a way that it is possible to retrieve ImageParagraph, LinkListParagraph objects directly over the Paragraphs navigation property.
How would you solve this problem?
ER-diagram: http://img443.imageshack.us/img443/46/69863714ks0.jpg
alt text http://img443.imageshack.us/img443/46/69863714ks0.jpg