﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-老赵点滴-随笔分类-LINQ to SQL</title><link>http://www.cnblogs.com/JeffreyZhao/category/110991.html</link><description>　　先做人，再做技术人员，最后做程序员。
　　我的理想：“让外国人看中国人写的技术书籍和文章”。Try as I might</description><language>zh-cn</language><lastBuildDate>Sat, 17 May 2008 06:28:17 GMT</lastBuildDate><pubDate>Sat, 17 May 2008 06:28:17 GMT</pubDate><ttl>60</ttl><item><title>扩展LINQ to SQL：使用Lambda Expression批量删除数据</title><link>http://www.cnblogs.com/JeffreyZhao/archive/2008/03/05/LINQ-to-SQL-Batch-Delete-Extension.html</link><dc:creator>Jeffrey Zhao</dc:creator><author>Jeffrey Zhao</author><pubDate>Wed, 05 Mar 2008 05:01:00 GMT</pubDate><guid>http://www.cnblogs.com/JeffreyZhao/archive/2008/03/05/LINQ-to-SQL-Batch-Delete-Extension.html</guid><wfw:comment>http://www.cnblogs.com/JeffreyZhao/comments/1091648.html</wfw:comment><comments>http://www.cnblogs.com/JeffreyZhao/archive/2008/03/05/LINQ-to-SQL-Batch-Delete-Extension.html#Feedback</comments><slash:comments>60</slash:comments><wfw:commentRss>http://www.cnblogs.com/JeffreyZhao/comments/commentRss/1091648.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/JeffreyZhao/services/trackbacks/1091648.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: ORM框架在删除数据方面一直有个尴尬，那就是无法通过指定条件批量删除数据。于是对于一些删除操作，我们不得不写SQL语句或者执行存储过程。幸运的是C# 3.0所拥有的强大特性足以让我们对LINQ to SQL的功能进行扩展。为了更好地进行项目开发，以及周五的一次技术交流，我为LINQ to SQL扩展了批量删除功能。&nbsp;&nbsp;<a href='http://www.cnblogs.com/JeffreyZhao/archive/2008/03/05/LINQ-to-SQL-Batch-Delete-Extension.html'>阅读全文</a><img src ="http://www.cnblogs.com/JeffreyZhao/aggbug/1091648.html?type=1" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://JeffreyZhao.cnblogs.com/" target="_blank">Jeffrey Zhao</a> 2008-03-05 13:01 <a href="http://www.cnblogs.com/JeffreyZhao/archive/2008/03/05/LINQ-to-SQL-Batch-Delete-Extension.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>LINQ to SQL异步查询</title><link>http://www.cnblogs.com/JeffreyZhao/archive/2008/03/01/async-query-with-linq-to-sql.html</link><dc:creator>Jeffrey Zhao</dc:creator><author>Jeffrey Zhao</author><pubDate>Fri, 29 Feb 2008 17:51:00 GMT</pubDate><guid>http://www.cnblogs.com/JeffreyZhao/archive/2008/03/01/async-query-with-linq-to-sql.html</guid><wfw:comment>http://www.cnblogs.com/JeffreyZhao/comments/1085559.html</wfw:comment><comments>http://www.cnblogs.com/JeffreyZhao/archive/2008/03/01/async-query-with-linq-to-sql.html#Feedback</comments><slash:comments>30</slash:comments><wfw:commentRss>http://www.cnblogs.com/JeffreyZhao/comments/commentRss/1085559.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/JeffreyZhao/services/trackbacks/1085559.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 异步操作是提高Web应用程序吞吐量的重要手段，关于这方面的话题已经在前文《正确使用异步操作》中解释过了。对于大多数互联网应用来说，性能瓶颈数据库访问。换句话说，一个请求在数据库操作上所花的时间往往是最多的——并且占总时间的90%以上。因此，当Web应用程序的吞吐量因为数据库操作的阻塞而受到影响的话，我们可是尝试使用异步数据库操作来进行优化。那么我们又该如何使用LINQ to SQL进行异步查询呢？&nbsp;&nbsp;<a href='http://www.cnblogs.com/JeffreyZhao/archive/2008/03/01/async-query-with-linq-to-sql.html'>阅读全文</a><img src ="http://www.cnblogs.com/JeffreyZhao/aggbug/1085559.html?type=1" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://JeffreyZhao.cnblogs.com/" target="_blank">Jeffrey Zhao</a> 2008-03-01 01:51 <a href="http://www.cnblogs.com/JeffreyZhao/archive/2008/03/01/async-query-with-linq-to-sql.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在LINQ to SQL中使用Translate方法以及修改查询用SQL</title><link>http://www.cnblogs.com/JeffreyZhao/archive/2008/02/19/using-translate-method-and-modify-command-text-before-query-in-linq-to-sql.html</link><dc:creator>Jeffrey Zhao</dc:creator><author>Jeffrey Zhao</author><pubDate>Mon, 18 Feb 2008 19:02:00 GMT</pubDate><guid>http://www.cnblogs.com/JeffreyZhao/archive/2008/02/19/using-translate-method-and-modify-command-text-before-query-in-linq-to-sql.html</guid><wfw:comment>http://www.cnblogs.com/JeffreyZhao/comments/1071017.html</wfw:comment><comments>http://www.cnblogs.com/JeffreyZhao/archive/2008/02/19/using-translate-method-and-modify-command-text-before-query-in-linq-to-sql.html#Feedback</comments><slash:comments>47</slash:comments><wfw:commentRss>http://www.cnblogs.com/JeffreyZhao/comments/commentRss/1071017.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/JeffreyZhao/services/trackbacks/1071017.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 目前LINQ to SQL的资料不多——老赵的意思是，目前能找到的资料都难以摆脱“官方用法”的“阴影”。LINQ to SQL最权威的资料自然是MSDN，但是MSDN中的文档说明和实例总是显得“大开大阖”，依旧有清晰的“官方”烙印——这简直是一定的。不过从按照过往的经验，在某些时候如果不按照微软划定的道道来走，可能就会发现别样的风景。老赵在最近的项目中使用了LINQ to SQL作为数据层的基础，在LINQ to SQL开发方面积累了一定经验，也总结出了一些官方文档上并未提及的有用做法，特此和大家分享。&nbsp;&nbsp;<a href='http://www.cnblogs.com/JeffreyZhao/archive/2008/02/19/using-translate-method-and-modify-command-text-before-query-in-linq-to-sql.html'>阅读全文</a><img src ="http://www.cnblogs.com/JeffreyZhao/aggbug/1071017.html?type=1" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://JeffreyZhao.cnblogs.com/" target="_blank">Jeffrey Zhao</a> 2008-02-19 03:02 <a href="http://www.cnblogs.com/JeffreyZhao/archive/2008/02/19/using-translate-method-and-modify-command-text-before-query-in-linq-to-sql.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Linq to Sql中管理并发更新时的冲突（3）：使用记录的时间戳进行检测</title><link>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/23/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-3-using-timestamp.html</link><dc:creator>Jeffrey Zhao</dc:creator><author>Jeffrey Zhao</author><pubDate>Fri, 23 Nov 2007 01:21:00 GMT</pubDate><guid>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/23/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-3-using-timestamp.html</guid><wfw:comment>http://www.cnblogs.com/JeffreyZhao/comments/968134.html</wfw:comment><comments>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/23/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-3-using-timestamp.html#Feedback</comments><slash:comments>13</slash:comments><wfw:commentRss>http://www.cnblogs.com/JeffreyZhao/comments/commentRss/968134.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/JeffreyZhao/services/trackbacks/968134.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在《<a href="http://www.cnblogs.com/JeffreyZhao/archive/2007/11/20/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-2.html">在Linq to Sql中管理并发更新时的冲突（2）：引发更新冲突</a>》一文中，我们描述了Linq to Sql检测在更新时是否产生了冲突的基本方法：将该记录每个字段原来的值和更新时的值进行对比，如果稍有不同则意味着记录被修改过，因此产生了更新冲突。不过您是否有这样的感觉，这种方法实在累赘了一些？因此Linq to Sql提供了另外一种检测并发更新冲突的方式：使用记录的时间戳。这并不是Linq to Sql特有的功能，如果您了解其他的ORM框架的话，就会发现诸如Hibernate也提供了类似的机制——自然，在使用上不会像Linq to Sql那样方便。&nbsp;&nbsp;<a href='http://www.cnblogs.com/JeffreyZhao/archive/2007/11/23/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-3-using-timestamp.html'>阅读全文</a><img src ="http://www.cnblogs.com/JeffreyZhao/aggbug/968134.html?type=1" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://JeffreyZhao.cnblogs.com/" target="_blank">Jeffrey Zhao</a> 2007-11-23 09:21 <a href="http://www.cnblogs.com/JeffreyZhao/archive/2007/11/23/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-3-using-timestamp.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>是否会成为问题——Linq to Sql的执行可能无法复用查询计划</title><link>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/21/linq-to-sql-cannot-cache-compiled-plan.html</link><dc:creator>Jeffrey Zhao</dc:creator><author>Jeffrey Zhao</author><pubDate>Wed, 21 Nov 2007 00:43:00 GMT</pubDate><guid>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/21/linq-to-sql-cannot-cache-compiled-plan.html</guid><wfw:comment>http://www.cnblogs.com/JeffreyZhao/comments/966357.html</wfw:comment><comments>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/21/linq-to-sql-cannot-cache-compiled-plan.html#Feedback</comments><slash:comments>31</slash:comments><wfw:commentRss>http://www.cnblogs.com/JeffreyZhao/comments/commentRss/966357.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/JeffreyZhao/services/trackbacks/966357.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 复用查询计划是Sql Server降低CPU开销，提高性能的一个重要手段。但是Linq to Sql可能无法复用查询计划，这是怎么回事儿呢？&nbsp;&nbsp;<a href='http://www.cnblogs.com/JeffreyZhao/archive/2007/11/21/linq-to-sql-cannot-cache-compiled-plan.html'>阅读全文</a><img src ="http://www.cnblogs.com/JeffreyZhao/aggbug/966357.html?type=1" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://JeffreyZhao.cnblogs.com/" target="_blank">Jeffrey Zhao</a> 2007-11-21 08:43 <a href="http://www.cnblogs.com/JeffreyZhao/archive/2007/11/21/linq-to-sql-cannot-cache-compiled-plan.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Linq to Sql中管理并发更新时的冲突（2）：引发更新冲突</title><link>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/20/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-2.html</link><dc:creator>Jeffrey Zhao</dc:creator><author>Jeffrey Zhao</author><pubDate>Tue, 20 Nov 2007 11:30:00 GMT</pubDate><guid>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/20/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-2.html</guid><wfw:comment>http://www.cnblogs.com/JeffreyZhao/comments/965613.html</wfw:comment><comments>http://www.cnblogs.com/JeffreyZhao/archive/2007/11/20/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-2.html#Feedback</comments><slash:comments>14</slash:comments><wfw:commentRss>http://www.cnblogs.com/JeffreyZhao/comments/commentRss/965613.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/JeffreyZhao/services/trackbacks/965613.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在上一讲中，我们提到了一些诸如“乐观并发控制”、“悲观并发控制”的概念，以及察看Linq to Sql自动生成sql语句的方法。从这篇文章起我们将继续来查看Linq to Sql在管理并发更新时是如何发现冲突问题的。&nbsp;&nbsp;<a href='http://www.cnblogs.com/JeffreyZhao/archive/2007/11/20/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-2.html'>阅读全文</a><img src ="http://www.cnblogs.com/JeffreyZhao/aggbug/965613.html?type=1" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://JeffreyZhao.cnblogs.com/" target="_blank">Jeffrey Zhao</a> 2007-11-20 19:30 <a href="http://www.cnblogs.com/JeffreyZhao/archive/2007/11/20/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql-2.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Linq to Sql中管理并发更新时的冲突（1）：预备知识</title><link>http://www.cnblogs.com/JeffreyZhao/archive/2007/10/30/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql.html</link><dc:creator>Jeffrey Zhao</dc:creator><author>Jeffrey Zhao</author><pubDate>Tue, 30 Oct 2007 15:49:00 GMT</pubDate><guid>http://www.cnblogs.com/JeffreyZhao/archive/2007/10/30/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql.html</guid><wfw:comment>http://www.cnblogs.com/JeffreyZhao/comments/943504.html</wfw:comment><comments>http://www.cnblogs.com/JeffreyZhao/archive/2007/10/30/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql.html#Feedback</comments><slash:comments>24</slash:comments><wfw:commentRss>http://www.cnblogs.com/JeffreyZhao/comments/commentRss/943504.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/JeffreyZhao/services/trackbacks/943504.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 无论与目前的ORM框架相比有没有优势，Linq to Sql在语言和平台的级别上为我们提供了一种新的操作对象和数据的方式，在一定程度上为我们解决了Object != Data的问题。在实际应用中，对于数据库的操作往往有着天生的并发性，因此在更新数据时可能会产生冲突。有些时候，如果没有合理的解决冲突问题，轻则让用户摸不着头脑，重则让系统数据处于一种不一致的状态。Linq to Sql自然考虑到了这一点，本系列讨论的内容，就是在使用Linq to Sql时，如何管理并发更新时产生的冲突。<br><br>　　本文为这个系列的第一篇，将讨论一些预备知识，它们是进行后续研究的基础。&nbsp;&nbsp;<a href='http://www.cnblogs.com/JeffreyZhao/archive/2007/10/30/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql.html'>阅读全文</a><img src ="http://www.cnblogs.com/JeffreyZhao/aggbug/943504.html?type=1" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://JeffreyZhao.cnblogs.com/" target="_blank">Jeffrey Zhao</a> 2007-10-30 23:49 <a href="http://www.cnblogs.com/JeffreyZhao/archive/2007/10/30/Solving-Concurrent-Conflict-Problem-in-Linq-to-Sql.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>