摘要:赋值给System.Func<T,TResult> fun类型1,using System;delegate string ConvertMethod(string inString);public class DelegateExample{ public static void Main() { // Instantiate delegate to reference Upperc...
阅读全文
摘要:1,查询操作的3个部分: a,获取数据源;DataContext db=new DataContext(@"e:\simpleshop.mdf");// DatasqlDataContext db=new DatasqlDataContex(); b,创建查询;var categorys=from p in db.category where p.categoryid.split...
阅读全文
摘要:1,在数据库中新建表,并添加字段。本例中为:student.id student.name2,在解决方案资源管理器中添加Linq ToSQL 类。本例中为:StudentBasicClasses.dbml3,在服务器资源管理器中打开数据库,并将表:studentinfo 拖放到Linq To SQL 类中。 现在就可以使用Linq To SQLl了:使用时首先实例化一个Linq代理类:linq ...
阅读全文