如果能用
asp.net 如何使用linq呢?新手接触linq

解决方案 »

  1.   

    可以的啊
    http://msdn.microsoft.com/zh-cn/netframework/aa904594.aspx
      

  2.   

    可以,前段时间用过,给你举个例子
                 ///一般存储过程              
                   var users = db.proc_GetAllUser();//linq调用存储过程
                    var a = (from u in db.proc_GetAllUser()
                             where u.LoginId.StartsWith("x")
                             select u).ToList();                /**
                     * linq调用带输入输出参数的存储过程
                        Create proc dbo.proc_spWithParam
                     * @customerId nchar(5)
                     * @rowcount int output
                     * as
                     * set nocount on
                     * set @rowcount =(select count(*) from customer where customerId=@customerId)
                     * 
                     * 后台调用
                     * private ExamDBDataContext db = new ExamDBDataContext();
                     * db.proc_spWithParam("a",ref rowcount)
                     
                     */
               //绑定
                    this.GridView1.DataSource = a;
                    this.GridView1.DataBind();
      

  3.   

    Linq是一个框架
    学Linq to sql:存储过程