区分存储模型和概念模型字段名称(实体框架)

时间:2022-06-07 13:23:48

Every sample I come across has the entities and properties in the storage model named exactly the same as in the conceptual model. So in the mapping section, I can't tell whether an entity or property is from the storage model or conceptual model.

我遇到的每个样本都具有存储模型中的实体和属性,其名称与概念模型中的实体和属性完全相同。所以在映射部分,我无法判断实体或属性是来自存储模型还是概念模型。

This is a snippet of an Entity Framework diagram. Which "ID" fields are from the database and which are from the entities?

这是实体框架图的片段。哪个“ID”字段来自数据库,哪些来自实体?

<AssociationSetMapping Name="FK_Orders_Customers" TypeName="ContosoModel.FK_Orders_Customers" StoreEntitySet="Order"> 
  <EndProperty Name="Customer">
    <ScalarProperty Name="ID" ColumnName="CustomerID" />
  </EndProperty>
  <EndProperty Name="Order">
    <ScalarProperty Name="ID" ColumnName="ID" />
  </EndProperty>
</AssociationSetMapping>

1 个解决方案

#1


Well only databases have Columns, so ColumnName is the Database Name. Name is from the Entity (or in this case the Association).

只有数据库具有列,因此ColumnName是数据库名称。名称来自实体(或在本例中为Association)。

Hope this helps Alex

希望这有助于Alex

#1


Well only databases have Columns, so ColumnName is the Database Name. Name is from the Entity (or in this case the Association).

只有数据库具有列,因此ColumnName是数据库名称。名称来自实体(或在本例中为Association)。

Hope this helps Alex

希望这有助于Alex