我应该如何存储/保存我的iCollection< class< t>>在EF中
我正在创建一个CMS,我选择以潜在有争议的方式保存页面。我有几个称为“页面”,“标题”,“身体”,“页脚”,“页脚”的课程; t>,row:sevments<行>,模板:段<模板>,elements< t>,段落:Elements≪段落>。
我不知道我应该如何保存类段< t>,row:sevments<行>,模板:段<模板>元素也是如此。
细分市场< t>放置在标题,车身,页脚和模板类中。 请记住,这些不是数据库对象,而是针对前端的对象,因此我可以正确渲染页面。
我应该保存细分市场< t>作为2个单独的Icollections,例如
public virtual ICollection<Row> {get; set;}
public virtual ICollection<Template> {get; set;}
(如果可能的话),
public virtual ICollection<Segments<T>>
则有一种拟合和效率的方法来保存Icollection&lt; segments&lt; t&gt;&gt;在EF数据库中?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论