c# - Entity Framework Code First Relationships: One to Many to Multiple Entities -
This is my first project using EF I'm making a model (this is an example) movies and TV series In the form of institutions, both of them have notes that are notes. There is also an entity. I have to keep one-to-many relationships between the notes and TVSeries-> Notes. How can this be accomplished?
It is important to note that the note relates to a movie or series.
You can not create a child who has two separate parents and the appropriate primary / Foreign key relationships are between them.
An option, assuming that movies and TV audiences have common qualities, use the legacy in the film / TV relationship and notes must stop the superclass. Something like this:
Public Essentials Entertainment Entertainment {Public Entry ID (Receive; Set;} Public String Title {get; Set;} // Other General Properties} Public Class Movie {One Movie Public Specifications for Public Sector TVSeries {Special Properties for a TV Series} Public Square Note {Public Entity Note ID {Received; Set;} Public AT BaseInternet ID {Received; Set;}} < / Div>
Comments
Post a Comment