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 ...
随机推荐
- 转载pll工作模式解析
PLL共有四种工作模式,只有理解了这四种工作模式的特点,才能在设计中选用恰当的模式,完成自己设计的预期功能.这四种工作模式分别是普通模式(Normal Mode).零延迟缓冲模式(Zero Delay ...
- Oracle 13c OEM 安装手册
1 安装准备工作 以下包已Redhat 为准,其他版的操作系统以官方手册为准. 1.1 Oracle Management Service 依赖如下包 glibc-comm ...
- CF 504E Misha and LCP on Tree——后缀数组+树链剖分
题目:http://codeforces.com/contest/504/problem/E 树链剖分,把重链都接起来,且把每条重链的另一种方向的也都接上,在这个 2*n 的序列上跑后缀数组. 对于询 ...
- (转)java.lang.RuntimeException: Missing type parameter
java.lang.RuntimeException: Missing type parameter (2015-04-07 14:35:51) 分类: 技术 程序中用到了gson的new typ ...
- 使用XV-11激光雷达做hector_slam
大家在学习ROS中不可避免需要使用激光雷达,高精地图.实时定位以及障碍物检测等多项技术,而这些技术都离不开光学雷达的支持,但是呢雷达这真是太贵了,大部分人是负担不起(实验室.研究所土豪可以略过),但是 ...
- PHP 判断手机号归属地 和 运营商的免费接口
在项目开发的时候,需要去查询又一批手机号或者固话的具体信息(归属地 运营商) 就需要写一个脚本,来批量请求接口来得到我们想要的数据 学习源头:https://blog.csdn.net/shaerdo ...
- Oracle日常性能问题查看
1 判断回滚段竞争的sql --当Ratio大于2时存在回滚段竞争,需要增加更多的回滚段) ratio from v$rollstat rs, v$rollname rn where rs.USN = ...
- UseSubmitBehavior="false" 防止页面重复提交bug
OnClientClick="this.disabled=true;" UseSubmitBehavior="false" 注: 1.当设置UseSubmitB ...
- Select/Poll/Epoll异步IO
IO多路复用 同步io和异步io,阻塞io和非阻塞io分别是什么,有什么样的区别? io模式 对于一次io 访问(以read为例),数据会先拷贝到操作系统内核的缓冲区,然后才会从操作系统内核的缓冲区拷 ...
- 如何在老惠普电脑上安装windows xp系统
如何在老惠普电脑上安装windows xp系统 前提,老式的紧凑的惠普台式机,装了linux系统,想要装windows xp系统另作他用.但是使用U盘PE怎么也进不了? 解决办法: 1.拆下惠普主机上 ...