<?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>
Entity Framework edmx(mapping文件)
时间: 2024-12-16 07:19:19
Entity Framework edmx(mapping文件)的相关文章
第二篇:Entity Framework CodeFirst &; Model 映射
小分享:我有几张阿里云优惠券,用券购买或者升级阿里云相应产品最多可以优惠五折!领券地址:https://promotion.aliyun.com/ntms/act/ambassador/sharetouser.html?userCode=ohmepe03 前一篇 第一篇:Entity Framework 简介 我有讲到,ORM 最关键的 Mapping,也提到了最早实现Mapping的技术,就是 特性 + 反射,那Entity Framework 实现Mapping 又是怎样的呢? Entity
Entity Framework学习笔记——edmx文件
上文简单介绍了一下Entity FrameWork,这里说一下EF的核心--edmx文件. 在VisualStudio中建立edmx文件(此例环境为VisualStudio2012) 1.新建-ADO.NET实体数据模型: 2.选择数据模型时,因为我之前已经在数据库中建立好表了,所以我们这里先选择从数据库生成(即DB First),如果选择空模型,就可以在没有建立数据库的情况下,通过先建立实体模型来生成实体类和数据库表. 3.选择数据库连接 4.选择或设置好连接的服务器.验证信息.数据库名: 5
[转]Entity Framework Fluent API - Configuring and Mapping Properties and Types
本文转自:https://msdn.microsoft.com/en-us/data/jj591617#1.2 When working with Entity Framework Code First the default behavior is to map your POCO classes to tables using a set of conventions baked into EF. Sometimes, however, you cannot or do not want t
Entity Framework 6.0 Tutorials(9):Stored Procedure Mapping
Code First - Insert, Update, Delete Stored Procedure Mapping: Entity Framework 6 Code-First provides the ability to create and use a stored procedure for add, update, and delete operations. This was not possible in the previous versions of Entity Fra
Entity Framework 丢失数据链接的绑定,在已绑好的EDMX中提示“Choose Your Data Connection”
早先做的一个练手的项目中, 使用到了Entity framework . 最近碰到一个问题,在edmx 里面选择“Update model from Database” 的时候提示了 “Choose Your Data Connection” 的数据库链接选择画面. 出现这个界面的话, 如果还继续走下去, 重新选择项目的DB connection的话, 原先已经加载到edmx的表,store procedure 等等 可能都需要删掉 ,再重新再加载一次. 表少点还好说, 多的话,就挺要命的. 花
[原创]Entity Framework查询原理
前言 Entity Framework的全称是ADO.NET Entity Framework,是微软开发的基于ADO.NET的ORM(Object/Relational Mapping)框架.Entity Framework的主要特点:1. 支持多种数据库(Microsoft SQL Server, Oracle, and DB2):2. 强劲的映射引擎,能很好地支持存储过程:3. 提供Visual Studio集成工具,进行可视化操作:4. 能够与ASP.NET, WPF, WCF, WCF
Entity Framework 与 LINQ to SQL
Entity Framework和LINQ to SQL到底有什么区别?这是一个很常见的问题.下面的表中简要罗列了两种技术的主要区别. LINQ to SQL Entity Framework 复杂度 相对不复杂 相对比较复杂 模型 域模型(Domain model) 概念数据模型(Conceptual data model) 数据库服务器 SQL Server 多种数据库产品 开发时间 快速应用开发 需要较长时间,但支持更多特性 继承 困难 容易 文件类型 DBML文件 EDMX,CDSL,M
【译著】Code First :使用Entity. Framework编程(6)
小分享:我有几张阿里云优惠券,用券购买或者升级阿里云相应产品最多可以优惠五折!领券地址:https://promotion.aliyun.com/ntms/act/ambassador/sharetouser.html?userCode=ohmepe03 Chapter6 Controlling Database Location,Creation Process, and Seed Data 第6章 控制数据库位置,创建过程和种子数据 In previous chapters you have
浅谈Entity Framework中的数据加载方式
小分享:我有几张阿里云优惠券,用券购买或者升级阿里云相应产品最多可以优惠五折!领券地址:https://promotion.aliyun.com/ntms/act/ambassador/sharetouser.html?userCode=ohmepe03 如果你还没有接触过或者根本不了解什么是Entity Framework,那么请看这里http://www.entityframeworktutorial.net/EntityFramework-Architecture.aspx,其中的一系列文