Entity Framework edmx(mapping文件)

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
<!-- EF Runtime content -->
<edmx:Runtime>
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="LeaveWordBoradModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
<EntityContainer Name="LeaveWordBoradModelStoreContainer">
<EntitySet Name="Msg" EntityType="LeaveWordBoradModel.Store.Msg" store:Type="Tables" Schema="dbo" />
<EntitySet Name="Users" EntityType="LeaveWordBoradModel.Store.Users" store:Type="Tables" Schema="dbo" />
<AssociationSet Name="FK_Msg_Users" Association="LeaveWordBoradModel.Store.FK_Msg_Users">
<End Role="Users" EntitySet="Users" />
<End Role="Msg" EntitySet="Msg" />
</AssociationSet>
<AssociationSet Name="FK_Msg_Users1" Association="LeaveWordBoradModel.Store.FK_Msg_Users1">
<End Role="Users" EntitySet="Users" />
<End Role="Msg" EntitySet="Msg" />
</AssociationSet>
</EntityContainer>
<EntityType Name="Msg">
<Key>
<PropertyRef Name="mId" />
</Key>
<Property Name="mId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
<Property Name="mFromUser" Type="int" Nullable="false" />
<Property Name="mToUser" Type="int" Nullable="false" />
<Property Name="mMsg" Type="nvarchar" Nullable="false" MaxLength="500" />
<Property Name="mAddtime" Type="datetime" Nullable="false" />
<Property Name="mIsDel" Type="bit" Nullable="false" />
</EntityType>
<EntityType Name="Users">
<Key>
<PropertyRef Name="uId" />
</Key>
<Property Name="uId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
<Property Name="uName" Type="nvarchar" Nullable="false" MaxLength="20" />
<Property Name="uLoginName" Type="nvarchar" Nullable="false" MaxLength="20" />
<Property Name="uPwd" Type="char" Nullable="false" MaxLength="32" />
<Property Name="uAddtime" Type="datetime" Nullable="false" />
<Property Name="uIsDel" Type="bit" Nullable="false" />
</EntityType>
<Association Name="FK_Msg_Users">
<End Role="Users" Type="LeaveWordBoradModel.Store.Users" Multiplicity="1" />
<End Role="Msg" Type="LeaveWordBoradModel.Store.Msg" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Users">
<PropertyRef Name="uId" />
</Principal>
<Dependent Role="Msg">
<PropertyRef Name="mFromUser" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_Msg_Users1">
<End Role="Users" Type="LeaveWordBoradModel.Store.Users" Multiplicity="1" />
<End Role="Msg" Type="LeaveWordBoradModel.Store.Msg" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Users">
<PropertyRef Name="uId" />
</Principal>
<Dependent Role="Msg">
<PropertyRef Name="mToUser" />
</Dependent>
</ReferentialConstraint>
</Association>
</Schema>
</edmx:StorageModels>
<!-- CSDL content -->
<edmx:ConceptualModels>
<Schema Namespace="LeaveWordBoradModel" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
<EntityContainer Name="LeaveWordBoradEntities" annotation:LazyLoadingEnabled="true">
<EntitySet Name="Msgs" EntityType="LeaveWordBoradModel.Msg" />
<EntitySet Name="Users" EntityType="LeaveWordBoradModel.User" />
<AssociationSet Name="FK_Msg_Users" Association="LeaveWordBoradModel.FK_Msg_Users">
<End Role="Users" EntitySet="Users" />
<End Role="Msg" EntitySet="Msgs" />
</AssociationSet>
<AssociationSet Name="FK_Msg_Users1" Association="LeaveWordBoradModel.FK_Msg_Users1">
<End Role="Users" EntitySet="Users" />
<End Role="Msg" EntitySet="Msgs" />
</AssociationSet>
</EntityContainer>
<EntityType Name="Msg">
<Key>
<PropertyRef Name="mId" />
</Key>
<Property Name="mId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="mFromUser" Type="Int32" Nullable="false" />
<Property Name="mToUser" Type="Int32" Nullable="false" />
<Property Name="mMsg" Type="String" Nullable="false" MaxLength="500" Unicode="true" FixedLength="false" />
<Property Name="mAddtime" Type="DateTime" Nullable="false" Precision="3" />
<Property Name="mIsDel" Type="Boolean" Nullable="false" />
<NavigationProperty Name="User" Relationship="LeaveWordBoradModel.FK_Msg_Users" FromRole="Msg" ToRole="Users" />
<NavigationProperty Name="User1" Relationship="LeaveWordBoradModel.FK_Msg_Users1" FromRole="Msg" ToRole="Users" />
</EntityType>
<EntityType Name="User">
<Key>
<PropertyRef Name="uId" />
</Key>
<Property Name="uId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="uName" Type="String" Nullable="false" MaxLength="20" Unicode="true" FixedLength="false" />
<Property Name="uLoginName" Type="String" Nullable="false" MaxLength="20" Unicode="true" FixedLength="false" />
<Property Name="uPwd" Type="String" Nullable="false" MaxLength="32" Unicode="false" FixedLength="true" />
<Property Name="uAddtime" Type="DateTime" Nullable="false" Precision="3" />
<Property Name="uIsDel" Type="Boolean" Nullable="false" />
<NavigationProperty Name="Msgs" Relationship="LeaveWordBoradModel.FK_Msg_Users" FromRole="Users" ToRole="Msg" />
<NavigationProperty Name="Msgs1" Relationship="LeaveWordBoradModel.FK_Msg_Users1" FromRole="Users" ToRole="Msg" />
</EntityType>
<Association Name="FK_Msg_Users">
<End Role="Users" Type="LeaveWordBoradModel.User" Multiplicity="1" />
<End Role="Msg" Type="LeaveWordBoradModel.Msg" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Users">
<PropertyRef Name="uId" />
</Principal>
<Dependent Role="Msg">
<PropertyRef Name="mFromUser" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_Msg_Users1">
<End Role="Users" Type="LeaveWordBoradModel.User" Multiplicity="1" />
<End Role="Msg" Type="LeaveWordBoradModel.Msg" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Users">
<PropertyRef Name="uId" />
</Principal>
<Dependent Role="Msg">
<PropertyRef Name="mToUser" />
</Dependent>
</ReferentialConstraint>
</Association>
</Schema>
</edmx:ConceptualModels>
<!-- C-S mapping content -->
<edmx:Mappings>
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs">
<EntityContainerMapping StorageEntityContainer="LeaveWordBoradModelStoreContainer" CdmEntityContainer="LeaveWordBoradEntities">
<EntitySetMapping Name="Msgs">
<EntityTypeMapping TypeName="LeaveWordBoradModel.Msg">
<MappingFragment StoreEntitySet="Msg">
<ScalarProperty Name="mId" ColumnName="mId" />
<ScalarProperty Name="mFromUser" ColumnName="mFromUser" />
<ScalarProperty Name="mToUser" ColumnName="mToUser" />
<ScalarProperty Name="mMsg" ColumnName="mMsg" />
<ScalarProperty Name="mAddtime" ColumnName="mAddtime" />
<ScalarProperty Name="mIsDel" ColumnName="mIsDel" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="Users">
<EntityTypeMapping TypeName="LeaveWordBoradModel.User">
<MappingFragment StoreEntitySet="Users">
<ScalarProperty Name="uId" ColumnName="uId" />
<ScalarProperty Name="uName" ColumnName="uName" />
<ScalarProperty Name="uLoginName" ColumnName="uLoginName" />
<ScalarProperty Name="uPwd" ColumnName="uPwd" />
<ScalarProperty Name="uAddtime" ColumnName="uAddtime" />
<ScalarProperty Name="uIsDel" ColumnName="uIsDel" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
</EntityContainerMapping>
</Mapping>
</edmx:Mappings>
</edmx:Runtime>
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
<Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
<Connection>
<DesignerInfoPropertySet>
<DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
</DesignerInfoPropertySet>
</Connection>
<Options>
<DesignerInfoPropertySet>
<DesignerProperty Name="ValidateOnBuild" Value="true" />
<DesignerProperty Name="EnablePluralization" Value="False" />
<DesignerProperty Name="IncludeForeignKeysInModel" Value="True" />
<DesignerProperty Name="CodeGenerationStrategy" Value="无" />
</DesignerInfoPropertySet>
</Options>
<!-- Diagram content (shape and connector positions) -->
<Diagrams></Diagrams>
</Designer>
</edmx:Edmx>

转载于:https://www.cnblogs.com/kexb/p/4782070.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值