摘要:
已编译查询 对于一些在项目中经常被用到的查询可以封装成已编译查询,这样就能提高执行效率:static class Queries{ public static Func<NorthwindDataContext, string, IQueryable<Customer>> CustomersByCity = CompiledQuery.Compile((NorthwindD... 阅读全文
posted @ 2010-06-01 13:01
kevin_20131022
阅读(171)
评论(0)
推荐(0)
摘要:
撤销提交 var customer = ctx.Customers.Single(c => c.CustomerID == "AROUT"); customer.ContactName = "zhuye"; customer.Country = "Shanghai"; Response.Write(string.Format("Name:{0},Country:{1}<br/>"... 阅读全文
posted @ 2010-06-01 12:59
kevin_20131022
阅读(209)
评论(0)
推荐(0)
摘要:
编写数据访问服务 首先我们可以定义出留言簿数据访问服务的契约(接口),把如下的代码保存为IDataAccess.cs放在Contract类库项目中:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;namespace Contract... 阅读全文
posted @ 2010-06-01 12:43
kevin_20131022
阅读(156)
评论(0)
推荐(0)
摘要:
WCF服务端与客户端 打开Host项目中的Program.cs,使用下面的代码来实现WCF的服务端:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using Service;using Contract;namespace Hos... 阅读全文
posted @ 2010-06-01 12:02
kevin_20131022
阅读(234)
评论(0)
推荐(0)
摘要:
1判断select选项中 是否存在Value="paraValue"的Item 2向select选项中 加入一个Item 3从select选项中 删除一个Item 4删除select中选中的项 5修改select选项中 value="paraValue"的text为"paraText" 6设置select中text="paraText"的第一个Item为选中 7设置select中value="pa... 阅读全文
posted @ 2010-06-01 11:57
kevin_20131022
阅读(267)
评论(0)
推荐(0)
浙公网安备 33010602011771号