摘要: #region //List<Mouse> list = new List<Mouse>(); //for (int i = 0; i < 10; i++) //{ // list.Add(new Mouse() { Name = i.ToString(), Money = i * 10 }); //} //foreach (var i in list) // Console.WriteLine(i.Name); //ILookup<string, int> lookup = list.ToLookup(p => p.Name, p => 阅读全文
posted @ 2011-06-15 23:17 天空海阔 阅读(288) 评论(1) 推荐(0) 编辑
摘要: Action<Transaction, string> action = (t, str) => { SqlConnection con = new SqlConnection("server=.;uid=sa;pwd=chen;database=pubs"); con.Open(); if(null != con) con.EnlistTransaction(t); string strSql = "insert into test values('" + str + "','zzz', 阅读全文
posted @ 2011-06-14 14:48 天空海阔 阅读(187) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using DB.Model;using System.Data;using System.Data.Objects;using System.Data.EntityClient;using System.Web;namespace Test{ class Program { static void Main(string[] args) { //using (DB.Model.pubsEntities pubs = new DB. 阅读全文
posted @ 2011-05-24 14:39 天空海阔 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 1 execute sp_fulltext_database 'enable'/disable --禁止/启用当前数据库全文索引2 SELECT FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')--判断是安装全文索引功能3 select databaseproperty('NorthWind','IsFullTextEnabled')--判断Northwind数据库是否可以进行全文索引4 exec sp_help_fulltext_tables-- 列出当前数据库可以进行全文索引的表5 阅读全文
posted @ 2011-05-20 15:45 天空海阔 阅读(210) 评论(0) 推荐(1) 编辑
摘要: http://www.cnblogs.com/qingyuan/archive/2011/05/13/2045616.html 阅读全文
posted @ 2011-05-15 18:21 天空海阔 阅读(95) 评论(0) 推荐(0) 编辑
摘要: http://msdn.microsoft.com/zh-cn/magazine/ee336126.aspx 阅读全文
posted @ 2011-05-14 01:01 天空海阔 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 在 2.0 以前的版本中 , 通常为每个数据库服务器的请求打开和关闭一个连接 , 并且同时只能执行一条命令 , 也就是不支持异步进程 , 打开数据库服务器的连接是一个很消耗资源的操作 , 如果能重用连接并且支持异步进程将会很爽... 现在 2.0 中的 MARS 及对异步进程的支持可以实现这件事情....MARS(Multiple Active Result Set) 多动结果集是 ADO.NET 提供的一个新功能 , MARS 可以在同一连接上处理多个活动的结果集 , 因为重用了连接 , 减少了数据库的访问 , 从而大大的提高了性能 . 这个功能结合另一新功能 : 对异步进程的支持 是一个很 阅读全文
posted @ 2011-05-13 10:17 天空海阔 阅读(311) 评论(0) 推荐(0) 编辑