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>
Entity Framework edmx(mapping文件)的更多相关文章
- 如何自动生成 Entity Framework 的 Mapping 文件?
Program.cs using System; using System.IO; using System.Text; using System.Text.RegularExpressions; n ...
- Entity Framework + WCF REST JSON Service
利用EF 和WCF 建立一个REST JSON Service. 首先我们要下载一个Visual Studio 的Template 叫 "ADO.NET C# POCO Entity Gen ...
- Entity Framework 之三层架构
今天,我们谈一下如何用Entity Framework构建一个三层架构.即包括DAL层,BLL层和MODEL层.我们先看一下目录结构,如下图: 目录中,我们有Web层,AVON.DMS.Model是实 ...
- 第二篇:Entity Framework CodeFirst & Model 映射
前一篇 第一篇:Entity Framework 简介 我有讲到,ORM 最关键的 Mapping,也提到了最早实现Mapping的技术,就是 特性 + 反射,那Entity Framework 实现 ...
- entity framework6 edmx文件详解
entity framework中的edmx文件作为代码与数据库沟通的桥梁,作用是至关重要的.如果edmx文件出了问题,ef就基本上没得用了.虽然edmx文件是由ef自动生成的,但是一些特定的操作可能 ...
- Entity Framework 丢失数据链接的绑定,在已绑好的EDMX中提示“Choose Your Data Connection”
早先做的一个练手的项目中, 使用到了Entity framework . 最近碰到一个问题,在edmx 里面选择“Update model from Database” 的时候提示了 “Choose ...
- [转]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 Firs ...
- Entity Framework 6.0 Tutorials(9):Stored Procedure Mapping
Code First - Insert, Update, Delete Stored Procedure Mapping: Entity Framework 6 Code-First provides ...
- Entity Framework 教程——创建实体数据模型
创建实体数据模型: 本文将带你创建实体数据模型(EDM)SchoolDB数据库和理解基础建设模块. 实体数据模型(EDM)是用于描述实体之间关系的一种模型,以下将使用Visual Studio 201 ...
随机推荐
- 剑指offer-第5章优化时间和空间效率(丑数)
题目:我们把只包含因子2,3,5的数叫做丑数.寻找第1500个丑数.通常把1当成第一个丑数. 思路1:第一步判断是否为丑数:丑数是只包含2,3,5的数,因此一定可以被2,3,5整除.通过求余数是否为零 ...
- django中的@login_required
转:http://www.cnblogs.com/ccorz/p/Django-zhong-loginrequired-yong-fa-jian-jie.html 1.网站开发时的登录需求: ===用 ...
- HTML <meta> http-equiv Attribute 说明
1. 说明 Value Description content-type Specifies the character encoding for the document. Example: & ...
- TabControl控件用法图解
1.首先创建一个MFC对话框框架,在对话框资源上从工具箱中添加上一个TabControl控件 2.根据需要修改一下属性,然后右击控件,为这个控件添加一个变量,将此控件跟一个CTabCtrl类变量绑定在 ...
- 善待Erlang 代码 -- 巧用 user_default
这是一篇水文 ----------------------------------------------------- 很好用的一个技巧 http://www.erlang.org/doc/man/ ...
- 权益保护-知识产权:知识产权(IP)百科
ylbtech-权益保护-知识产权:知识产权(IP)百科 知识产权,也称其为“知识所属权”,指“权利人对其智力劳动所创作的成果和经营活动中的标记.信誉所依法享有的专有权利”,一般只在有限时间内有效.各 ...
- ITextSharp使用说明 (转)
原文: http://www.cnblogs.com/LifelongLearning/archive/2010/12/28/1919138.html TextSharp是一个生成Pdf文件的开源项目 ...
- PHP定时任务Crontab结合CLI模式详解
从版本 4.3.0 开始,PHP 提供了一种新类型的 CLI SAPI(Server Application Programming Interface,服务端应用编程端口)支持,名为 CLI,意为 ...
- linux那点事儿(七)----文件系统管理
如果你是一位忠实的windows 用户,那么现在请你打开的的c盘,打开WINDWOS目录,下面存放了哪些文件和目录,相信没有人关心过吧!即便是用windows多年的人.额!其实,我也知道WINDOWS ...
- Python多线程-信号量
信号量就是一个线程中有多个线程 # -*- coding:utf-8 -*- __author__ = "MuT6 Sch01aR" import threading import ...