How should I store/save my ICollection<class<T>> in EF

Viewed 430

I'm creating a CMS in which I have chosen to save my pages in a potentially controversial way. I Have a few classes called "Page", "Header", "Body", "Footer", Segments< T >, Row : Segments< Row >, Template : Segments< Template >, Elements< T >, Paragraph : Elements< Paragraph >.

I don't know how I should save the classes Segments< T >, Row : Segments< Row >, Template : Segments< Template > the same goes for the Elements.

The Segments< T > is placed inside the Header, Body, Footer and template class. Please keep in mind these are not database objects but these are for the frontend so I can render the page correctly.

Should i save the Segments< T > as 2 separate ICollections like

public virtual ICollection<Row> {get; set;}
public virtual ICollection<Template> {get; set;} 

Instead of (if possible)

public virtual ICollection<Segments<T>>

Is there a fitting and efficiant way to save ICollection<segments< T >> in a EF database?

0 Answers
Related