![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linq
thebesttome
i can i do it
展开
-
C# 用Linq的方式实现对Xml文件的基本操作(创建xml文件、增删改查xml文件节点信息)
原帖地址:http://www.cnblogs.com/mingmingruyuedlut/archive/2011/01/27/1946239.html 我的上一篇文章描述了用普通方法实现对xml文件的基本操作,感谢各位园友给我提的每一个建议,大家主要在说:用Linq去实现对xml的操作更加方便简洁,于是乎我就现学习了一下Linq to xml,由于是刚刚接触Linq,理解肯定不会很深,所以转载 2012-04-09 18:19:01 · 63 阅读 · 0 评论 -
让Entity Framework支持MySql数据库
原帖地址:http://www.aspxhome.com/database/mysql/201012/1481114.htm Entity Framework 4.0 也可以支持大名鼎鼎的MySql,这篇POST将向展示如何实现EF+MySql数据库的结构.首先,你必须下载MySQL Connector/NET 6.3.5 ,也就是.net下连接MySql数据库的驱动程序. 还是像以往一样的转载 2012-04-09 18:52:32 · 11522 阅读 · 2 评论 -
Linq to Entities in Ado.net EF的事务
原帖地址:http://blog.csdn.net/chsword/article/details/2975341 保持重典的风格,先看一下最终的效果. 前言 这事吧,还得从Linq to Sql说起 近乎所有的Linq to SQL的查询中总是免不了exec sp_reset_connection 与Audit Logout(就 是数据库连接) 这一进一出,费时太多,于是近半年转载 2012-04-09 18:34:34 · 1036 阅读 · 0 评论 -
Linq to xml
原帖地址:http://blog.csdn.net/gentle_wolf/article/details/2708386 操作XML XML LINQ简介 本章包括 n XML LINQ设计原则 n XML LINQ类层次 n 加载、解析和操作XML XML LINQ允许我们使用我们已经熟悉的LINQ查询语法查询XML数据,而不是学习查询XML的新的API。此外,转载 2012-04-09 18:16:43 · 689 阅读 · 0 评论 -
Linq——Count、Sum、Min、Max、Average
原帖地址:http://blog.sina.com.cn/s/blog_5421dfd20100i6cw.html using System; using System.Data; using System.Configuration; using System.Linq; using System.Web; using System.Web.Security; using Syst转载 2012-04-09 18:32:31 · 462 阅读 · 0 评论 -
An entity object cannot be referenced by multiple instances of IEntityChangeTracker.
原帖地址:http://www.cnblogs.com/fengzhiyidao/archive/2011/08/27/2104388.html 使用AOD.Net Entity Framework 对建立了关系的表新增记录时出现: An entity object cannot be referenced by multiple instances of IEntityChangeTr转载 2012-04-09 18:35:44 · 4592 阅读 · 2 评论 -
LINQ语句中的.AsEnumerable() 和 .AsQueryable()的区别
原帖:http://blog.csdn.net/codefighting/article/details/7048966 在写LINQ语句的时候,往往会看到.AsEnumerable() 和 .AsQueryable() 。 例如: [csharp] view plaincopy string strcon = "Data Source=.\\SQLEXPRES转载 2012-05-09 11:29:23 · 4562 阅读 · 0 评论 -
Linq 中按照多个值进行分组(GroupBy
原帖:http://www.cnblogs.com/activities/archive/2011/09/18/2180534.html /// 要查询的对象 class Employee { public int ID { get;set; } public string FName { get; set; } public int Age { get; set; }转载 2012-05-22 10:24:57 · 35583 阅读 · 0 评论