DBSet Class(EF基础系列11)
|
Method Name |
Return Type |
Description |
|
Add |
Added entity type |
Adds the given entity to the context the Added state. When the changes are being saved, the entities in the Added states are inserted into the database. After the changes are saved, the object state changes to Unchanged. Example: |
|
AsNoTracking<Entity> |
DBQuery<Entity> |
Returns a new query where the entities returned will not Entities Example: |
|
Attach(Entity) |
Entity which was passed as parameter |
Attaches the given entity to the context in the Unchanged Example: |
|
Create |
Entity |
Creates a new instance of an entity for the type of this Example: |
|
Find(int) |
Entity type |
Uses the primary key value to attempt to find an entity Example: |
|
Include |
DBQuery |
Returns the included non generic LINQ to Entities query Example: |
|
Remove |
Removed entity |
Marks the given entity as Deleted. When the changes are Example: |
|
SqlQuery |
DBSqlQuery |
Creates a raw SQL query that will return entities in this Example: |
DBSet Class(EF基础系列11)的更多相关文章
- 【Basics of Entity Framework】【EF基础系列1】
EF自己包括看视频,看MSDN零零散散的学了一点皮毛,这次打算系统学习一下EF.我将会使用VS2012来学习这个EF基础系列. 现在看看EF的历史吧: EF版本 相关版本特性介绍 EF3.5 基于数据 ...
- 1.翻译:EF基础系列--什么是Entity Framework?
大家好,好久不见,EF系列之前落下了,还是打算重新整理一下. 先说说目前的打算:先简单了解一下EF基础系列-->然后就是EF 6 Code-First系列-->接着就是EF 6 DB-Fi ...
- 10.翻译:EF基础系列---EF中的持久性
原文链接:http://www.entityframeworktutorial.net/EntityFramework4.3/persistence-in-entity-framework.aspx ...
- 6.翻译:EF基础系列---什么是EF中的实体?
原文地址:http://www.entityframeworktutorial.net/basics/what-is-entity-in-entityframework.aspx EF中的实体就是继承 ...
- 8.翻译:EF基础系列----EF中实体的状态
原文链接:http://www.entityframeworktutorial.net/basics/entity-states.aspx 在实体的生命周期中,EF API维护着每一个实体的状态,对于 ...
- EF中的开放式并发(EF基础系列--28)
好久没更新EF这个系列了,现在又重新开始. 这次学习,开放式并发.首先拿出数据库脚本: 说明一下,这个数据库脚本是之前的章节中稍作修改的: USE [SchoolDB] GO /****** Obje ...
- 9.翻译:EF基础系列---使用EF开发的方式有哪些?
原文链接:http://www.entityframeworktutorial.net/choosing-development-approach-with-entity-framework.aspx ...
- 4.翻译:EF基础系列--EF架构
原文地址:http://www.entityframeworktutorial.net/EntityFramework-Architecture.aspx 下面的图形,展示了EF的总体架构: 让我们来 ...
- 3.翻译:EF基础系列--EF怎么工作的?
原文链接:http://www.entityframeworktutorial.net/basics/how-entity-framework-works.aspx 这里,你将会大概了解到EF是怎么工 ...
随机推荐
- metaq安装实例
下载metaq: http://fnil.net/downloads/index.html 安装metaq: [root@localhost software]# pwd /export/softwa ...
- [数据库]SQL Server 用户NT AUTHORITY\IUSR 登录失败
今天打开网站时,突然报这个错误,平时都好好的 Cannot open database "JMECC" requested by the login. The login fail ...
- DataTable添加行和列数据
protected void Page_Load() { DataTable newdtb = new DataTable(); newdtb.Columns.Add("Id", ...
- 小兔的棋盘(hdu2067)
小兔的棋盘 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Subm ...
- 【jquery】基于 jquery 实现 ie 浏览器兼容 placeholder 效果
placeholder 是 html5 新增加的属性,主要提供一种提示(hint),用于描述输入域所期待的值.该提示会在输入字段为空时显示,并会在字段获得焦点时消失.placeholder 属性适用于 ...
- HTML Hyperlink between and within pages
In HTML, we can use tag <a href=""> to create hyperlinks between and within pages. T ...
- Python: Catch multiple exceptions in one line (except block)
Enclose in parentheses: except (IDontLIkeYouException, YouAreBeingMeanException) as e: pass Separati ...
- Window 通过cmd查看端口占用、相应进程、杀死进程等的命令【转】
一. 查看所有进程占用的端口 在开始-运行-cmd,输入:netstat –ano可以查看所有进程 二.查看占用指定端口的程序 当你在用tomcat发布程序时,经常会遇到端口被占用的情况,我们想知 ...
- WebService SendTimeout 超时问题
System.TimeoutException: 请求通道在等待 00:01:00 以后答复时超时.增加传递给请求调用的超时值,或者增加绑定上的 SendTimeout 值.分配给此操作的时间可能是更 ...
- C# Use Pop3Client to read gmail
host = "pop.gmail.com" user = "xxxxx@gmail.com" password = "xxxx" port ...