简体   繁体   English

一个实体关联多个实体

[英]One entity related to multiple entities

I have the 3 following entities.我有以下 3 个实体。

  • Category类别
  • Post邮政
  • Sprint短跑

When I am creating an post or sprint I'd really like to place them under a category.当我创建帖子或冲刺时,我真的很想将它们放在一个类别下。 But how can I solve this problem by not making 2 separate entities?但是如何通过不创建 2 个单独的实体来解决这个问题?

I'm confused.我糊涂了。

Add a category column to each of the Post and Sprint tables.向每个 Post 和 Sprint 表添加一个类别列。 Thanks Gordon Linoff!感谢戈登·林诺夫!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 数据库结构,多个实体的一个大实体 - Database structure, one big entity for multiple entities 实体框架:保存相关实体 - Entity Framework: saving related entities 实体框架-在一个请求中通过多个导航属性加载实体 - Entity Framework - loading entities by multiple navigation properties in one request 哪一个更快? 查询1个实体,并在其他相关实体上进行往返? 还是刚离开1次往返旅行? - Which one is faster? Query 1 Entity and make roundtrip on other related entities? or just left join it with 1 roundtrip? CrudRepository:由多个相关实体查找 - CrudRepository: find by multiple related entities 使用SQL Server和实体框架为相关实体建模 - Modeling related entities with SQL Server and entity framework 实体框架 - 在相关实体上加载相关实体(一对多对一) - Entity Framework - Load related entity on related entites (one to many to one) 如何使用原始 SQL 查询在 .net core 中检索具有相关实体的实体? - How to retrieve an entity with related entities in .net core with raw SQL queries? 实体框架:跳过几列或从相关实体中选择为空 - Entity Framework: Skip few columns or select as null from related entities 如何获得没有特定相关实体的所有实体? - How can I get all entities without a specific related entity?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM