Linq To Sql进阶系列(五)Store Procedure篇

Store Procedure,存储过程。也是被别人写过的东西。我习惯性先看别人都写了点啥,然后才开始想看看自己还要写点啥。那就先谈谈它与udf的区别吧。


Linq To Sql进阶系列(四)User Define Function篇 中,我们提到了两者的差别。比如Store Procedure支持多个rowset的,而udf不行。他们还有一些其他的差别。Store Procedure只能返回整型,而udf可以是其他类型,比如char等,除个别类型外,比如imager类型,是不可以做为udf的返回类型的。Store Procedure支持Out Parameter而udf没有。

1, SingleResultSet

我们先来看这个sprocs.

《Linq To Sql进阶系列(五)Store Procedure篇》
CREATE
 
PROCEDURE
 
[
dbo
]
.
[
Customers By City
]

《Linq To Sql进阶系列(五)Store Procedure篇》    


 Add the parameters for the stored procedure here

《Linq To Sql进阶系列(五)Store Procedure篇》

    (
@param1
 
NVARCHAR
(
20
))
《Linq To Sql进阶系列(五)Store Procedure篇》

AS

《Linq To Sql进阶系列(五)Store Procedure篇》

BEGIN

《Linq To Sql进阶系列(五)Store Procedure篇》    


 SET NOCOUNT ON added to prevent extra result sets from

《Linq To Sql进阶系列(五)Store Procedure篇》

    

 interfering with SELECT statements.

《Linq To Sql进阶系列(五)Store Procedure篇》

    
SET
 NOCOUNT 
ON
;
《Linq To Sql进阶系列(五)Store Procedure篇》    

SELECT
 CustomerID, ContactName, CompanyName, City 
from
 Customers 
as
 c 
where
 c.City
=
@param1

《Linq To Sql进阶系列(五)Store Procedure篇》

END 其生成的code如下。

《Linq To Sql进阶系列(五)Store Procedure篇》
        [Function(Name
=

dbo.[Customers By City]

)]
《Linq To Sql进阶系列(五)Store Procedure篇》        

public
 ISingleResult
<
Customers_By_CityResult
>
 Customers_By_City([Parameter(DbType
=

NVarChar(20)

)] 
string
 param1)
《Linq To Sql进阶系列(五)Store Procedure篇》《Linq To Sql进阶系列(五)Store Procedure篇》        

《Linq To Sql进阶系列(五)Store Procedure篇》
{
《Linq To Sql进阶系列(五)Store Procedure篇》            IExecuteResult result 
= this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), param1);
《Linq To Sql进阶系列(五)Store Procedure篇》            
return ((ISingleResult<Customers_By_CityResult>)(result.ReturnValue));
《Linq To Sql进阶系列(五)Store Procedure篇》        }
这里Customers_By_CityResult是这个sprocs的影射类。但你可以在OR Designer里调整。如图,

《Linq To Sql进阶系列(五)Store Procedure篇》

选中该函数后,右击属性。就可以使用其他影射类。但是Linq会对返回的rowset做检查,如果发现返回结果和影射不匹配它会报错。而且一旦更改了,当你需要改回去的时候,你只能在Designer中删掉此sprocs,然后重新拖过来。

调用它很简单,就当作一个函数,但是,这里和普通的linq语句不一样的地方是,它不是延迟加载的。

《Linq To Sql进阶系列(五)Store Procedure篇》
            DataClasses1DataContext db 
=
 
new
 DataClasses1DataContext();
《Linq To Sql进阶系列(五)Store Procedure篇》            db.Log 

=
 Console.Out;
《Linq To Sql进阶系列(五)Store Procedure篇》            var q 

=
 db.Customers_By_City(

London

); 正因它不是延迟加载的,所以,linq可以对他进行简单的内联操作,比如

《Linq To Sql进阶系列(五)Store Procedure篇》
            DataClasses1DataContext db 
=
 
new
 DataClasses1DataContext();
《Linq To Sql进阶系列(五)Store Procedure篇》            db.Log 

=
 Console.Out;
《Linq To Sql进阶系列(五)Store Procedure篇》
《Linq To Sql进阶系列(五)Store Procedure篇》            var q 

=
 from c 
in
 db.Customers_By_City(

London

)
《Linq To Sql进阶系列(五)Store Procedure篇》                    orderby c.City
《Linq To Sql进阶系列(五)Store Procedure篇》                    select c;
注意的时,这里是Linq To Object而不是Linq To Sql。

2, MultipleResultSets

看下面的例子

《Linq To Sql进阶系列(五)Store Procedure篇》
CREATE
 
PROCEDURE
 
[
dbo
]
.
[
Get Customer And Orders
]
(
@CustomerID
 
nchar
(
5
))
《Linq To Sql进阶系列(五)Store Procedure篇》    


 Add the parameters for the stored procedure here

《Linq To Sql进阶系列(五)Store Procedure篇》

AS

《Linq To Sql进阶系列(五)Store Procedure篇》

BEGIN

《Linq To Sql进阶系列(五)Store Procedure篇》    


 SET NOCOUNT ON added to prevent extra result sets from

《Linq To Sql进阶系列(五)Store Procedure篇》

    

 interfering with SELECT statements.

《Linq To Sql进阶系列(五)Store Procedure篇》

    
SET
 NOCOUNT 
ON
;
《Linq To Sql进阶系列(五)Store Procedure篇》    

SELECT
 
*
 
FROM
 Customers 
AS
 c 
WHERE
 c.CustomerID 
=
 
@CustomerID
  
《Linq To Sql进阶系列(五)Store Procedure篇》    

SELECT
 
*
 
FROM
 Orders 
AS
 o 
WHERE
 o.CustomerID 
=
 
@CustomerID

《Linq To Sql进阶系列(五)Store Procedure篇》

END 使用OR designer对其影射,其dbml为

《Linq To Sql进阶系列(五)Store Procedure篇》
  
<
Function 
Name
=”dbo.[Get Customer And Orders]”
 Method
=”Get_Customer_And_Orders”
>

《Linq To Sql进阶系列(五)Store Procedure篇》    

<
Parameter 
Name
=”CustomerID”
 Parameter
=”customerID”
 Type
=”System.String”
 DbType
=”NChar(5)”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》    

<
ElementType 
Name
=”Get_Customer_And_OrdersResult”
>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”CustomerID”
 Type
=”System.String”
 DbType
=”NChar(5) NOT NULL”
 CanBeNull
=”false”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”CompanyName”
 Type
=”System.String”
 DbType
=”NVarChar(40) NOT NULL”
 CanBeNull
=”false”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ContactName”
 Type
=”System.String”
 DbType
=”NVarChar(30)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ContactTitle”
 Type
=”System.String”
 DbType
=”NVarChar(30)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Address”
 Type
=”System.String”
 DbType
=”NVarChar(60)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”City”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Region”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”PostalCode”
 Type
=”System.String”
 DbType
=”NVarChar(10)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Country”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Phone”
 Type
=”System.String”
 DbType
=”NVarChar(24)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Fax”
 Type
=”System.String”
 DbType
=”NVarChar(24)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》    

</
ElementType
>

《Linq To Sql进阶系列(五)Store Procedure篇》  

</
Function
> 用sqlmetal对它做影射,生成dbml为

《Linq To Sql进阶系列(五)Store Procedure篇》
<
Function 
Name
=”dbo.Get Customer And Orders”
 Method
=”GetCustomerAndOrders”
>

《Linq To Sql进阶系列(五)Store Procedure篇》    

<
Parameter 
Name
=”CustomerID”
 Parameter
=”customerID”
 Type
=”System.String”
 DbType
=”NChar(5)”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》    

<
ElementType 
Name
=”GetCustomerAndOrdersResult1″
>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”CustomerID”
 Type
=”System.String”
 DbType
=”NChar(5)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”CompanyName”
 Type
=”System.String”
 DbType
=”NVarChar(40)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ContactName”
 Type
=”System.String”
 DbType
=”NVarChar(30)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ContactTitle”
 Type
=”System.String”
 DbType
=”NVarChar(30)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Address”
 Type
=”System.String”
 DbType
=”NVarChar(60)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”City”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Region”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”PostalCode”
 Type
=”System.String”
 DbType
=”NVarChar(10)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Country”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Phone”
 Type
=”System.String”
 DbType
=”NVarChar(24)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Fax”
 Type
=”System.String”
 DbType
=”NVarChar(24)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》    

</
ElementType
>

《Linq To Sql进阶系列(五)Store Procedure篇》    

<
ElementType 
Name
=”GetCustomerAndOrdersResult2″
>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”OrderID”
 Type
=”System.Int32″
 DbType
=”Int”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”CustomerID”
 Type
=”System.String”
 DbType
=”NChar(5)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”EmployeeID”
 Type
=”System.Int32″
 DbType
=”Int”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”OrderDate”
 Type
=”System.DateTime”
 DbType
=”DateTime”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”RequiredDate”
 Type
=”System.DateTime”
 DbType
=”DateTime”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ShippedDate”
 Type
=”System.DateTime”
 DbType
=”DateTime”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ShipVia”
 Type
=”System.Int32″
 DbType
=”Int”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”Freight”
 Type
=”System.Decimal”
 DbType
=”Money”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ShipName”
 Type
=”System.String”
 DbType
=”NVarChar(40)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ShipAddress”
 Type
=”System.String”
 DbType
=”NVarChar(60)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ShipCity”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ShipRegion”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ShipPostalCode”
 Type
=”System.String”
 DbType
=”NVarChar(10)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》      

<
Column 
Name
=”ShipCountry”
 Type
=”System.String”
 DbType
=”NVarChar(15)”
 CanBeNull
=”true”
 
/>

《Linq To Sql进阶系列(五)Store Procedure篇》    

</
ElementType
>

《Linq To Sql进阶系列(五)Store Procedure篇》  

</
Function
> 仔细比较他们的区别哦。“好像名字不一样呢”。晕倒。看主要的。第一个只有一个ElementType子项,而第二个有2个。这个地方其实可以说是OR designer的一个bug。要想修改这个bug,需要更改一个设计,而推动更改设计,比较麻烦。但并不是不能改。如果你认为这个真的很需要,而且对你很重要,你更喜欢用or designer的话,我建议你去下面的社区发帖子。

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=123&SiteID=1

要求更改此处的问题。因为,我已经无力推动他们修复该bug,ms更乐意听来自客户的声音,说不定你会成功的哦,还有奖励的哦。

这个sprocs准确的影射代码为

《Linq To Sql进阶系列(五)Store Procedure篇》
        [Function(Name
=

dbo.Get Customer And Orders

)]
《Linq To Sql进阶系列(五)Store Procedure篇》        [ResultType(

typeof
(GetCustomerAndOrdersResult1))]
《Linq To Sql进阶系列(五)Store Procedure篇》        [ResultType(

typeof
(GetCustomerAndOrdersResult2))]
《Linq To Sql进阶系列(五)Store Procedure篇》        

public
 IMultipleResults GetCustomerAndOrders([Parameter(Name
=

CustomerID

, DbType
=

NChar(5)

)] 
string
 customerID)
《Linq To Sql进阶系列(五)Store Procedure篇》《Linq To Sql进阶系列(五)Store Procedure篇》        

《Linq To Sql进阶系列(五)Store Procedure篇》
{
《Linq To Sql进阶系列(五)Store Procedure篇》            IExecuteResult result 
= this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), customerID);
《Linq To Sql进阶系列(五)Store Procedure篇》            
return ((IMultipleResults)(result.ReturnValue));
《Linq To Sql进阶系列(五)Store Procedure篇》        }

对于MultipleResultSets的sprocs,大家更关注如何取其返回结果。其实很简单,按顺序,一个rowset,一个rowset的取。这个顺序和你sprocs里的顺序是一样的。

IMultipleResults result = db.GetCustomerAndOrders(“SEVES”);

IEnumerable<CustomerResultSet> customer = result.GetResult<CustomerResultSet>();

IEnumerable<OrdersResultSet> orders = result.GetResult<OrdersResultSet>();

如果,你很贪心,再加一行的话,

IEnumerable<CustomerResultSet> customer = result.GetResult<CustomerResultSet>();

报错咯,越界了。没有那么多,你问要也不给。

3,OutParameters

似乎没有什么好讲的,很简单,当作ref 的函数参数输出的。其也只是在生成的函数里加了这么一句

outParameter =  ((System.
Nullable<
int>)(result.GetParameterValue(1))); 调用result.GetParameterValue方法,大家要记住这个哦。

4,Return Value

呀,把return value丢那里了。的确,Linq曾舍弃过return value.后来在qa的坚持下,dev们决定保留了它。但是,需要你自己去更改code,才能获得。我们可以从下面这个sprocs上获得灵感。

《Linq To Sql进阶系列(五)Store Procedure篇》
CREATE
 
PROCEDURE
 
[
dbo
]
.
[
CustOrderTotal
]
 
《Linq To Sql进阶系列(五)Store Procedure篇》

@CustomerID
 
nchar
(
5
),
《Linq To Sql进阶系列(五)Store Procedure篇》

@TotalSales
 
money
 OUTPUT
《Linq To Sql进阶系列(五)Store Procedure篇》

AS

《Linq To Sql进阶系列(五)Store Procedure篇》

SELECT
 
@TotalSales
 
=
 
SUM
(OD.UNITPRICE
*
(
1

OD.DISCOUNT) 
*
 OD.QUANTITY)
《Linq To Sql进阶系列(五)Store Procedure篇》

FROM
 ORDERS O, “
ORDER
 DETAILS” OD
《Linq To Sql进阶系列(五)Store Procedure篇》

where
 O.CUSTOMERID 
=
 
@CustomerID
 
AND
 O.ORDERID 
=
 OD.ORDERID
《Linq To Sql进阶系列(五)Store Procedure篇》
其影射的code为

《Linq To Sql进阶系列(五)Store Procedure篇》
        [Function(Name
=

dbo.CustOrderTotal

)]
《Linq To Sql进阶系列(五)Store Procedure篇》        

public
 
int
 CustOrderTotal([Parameter(Name
=

CustomerID

, DbType
=

NChar(5)

)] 
string
 customerID, [Parameter(Name
=

TotalSales

, DbType
=

Money

)] 
ref
 System.Nullable
<
decimal
>
 totalSales)
《Linq To Sql进阶系列(五)Store Procedure篇》《Linq To Sql进阶系列(五)Store Procedure篇》        

《Linq To Sql进阶系列(五)Store Procedure篇》
{
《Linq To Sql进阶系列(五)Store Procedure篇》            IExecuteResult result 
= this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), customerID, totalSales);
《Linq To Sql进阶系列(五)Store Procedure篇》            totalSales 
= ((System.Nullable<decimal>)(result.GetParameterValue(1)));
《Linq To Sql进阶系列(五)Store Procedure篇》            
return ((int)(result.ReturnValue));
《Linq To Sql进阶系列(五)Store Procedure篇》        }
因为该sprocs并没有rowset返回,其最后只剩返回值了。其是将result.RenturnValue强制转化为int型,以得到sprocs的整形返回值。那对于SingleResultSet和MultipleResultSets的,该如何获取它的返回值呢?那只有自己动手,修改code了。就是自己强制转换,而后通过out 参数输出。比如用第一个sprocs

《Linq To Sql进阶系列(五)Store Procedure篇》
        [Function(Name 
=
 

dbo.[Customers By City]

)]
《Linq To Sql进阶系列(五)Store Procedure篇》        

public
 ISingleResult
<
Customers_By_CityResult1
>
 Customers_By_City([Parameter(DbType 
=
 

NVarChar(20)

)] 
string
 param1)
《Linq To Sql进阶系列(五)Store Procedure篇》《Linq To Sql进阶系列(五)Store Procedure篇》        

《Linq To Sql进阶系列(五)Store Procedure篇》
{
《Linq To Sql进阶系列(五)Store Procedure篇》            IExecuteResult result 
= this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), param1);
《Linq To Sql进阶系列(五)Store Procedure篇》            
return ((ISingleResult<Customers_By_CityResult1>)(result.ReturnValue));
《Linq To Sql进阶系列(五)Store Procedure篇》        }


《Linq To Sql进阶系列(五)Store Procedure篇》        

public
 ISingleResult
<
Customers_By_CityResult1
>
 Customers_By_City2(
string
 para, 
out
 
int
 returnValue)
《Linq To Sql进阶系列(五)Store Procedure篇》《Linq To Sql进阶系列(五)Store Procedure篇》        

《Linq To Sql进阶系列(五)Store Procedure篇》
{
《Linq To Sql进阶系列(五)Store Procedure篇》            ISingleResult
<Customers_By_CityResult1> result = this.Customers_By_City(para);
《Linq To Sql进阶系列(五)Store Procedure篇》            returnValue 
= (int)result.ReturnValue;
《Linq To Sql进阶系列(五)Store Procedure篇》            
return ((ISingleResult<Customers_By_CityResult1>)result);
《Linq To Sql进阶系列(五)Store Procedure篇》        }
测试一下

《Linq To Sql进阶系列(五)Store Procedure篇》
            DataClasses1DataContext db 
=
 
new
 DataClasses1DataContext();
《Linq To Sql进阶系列(五)Store Procedure篇》            db.Log 

=
 Console.Out;
《Linq To Sql进阶系列(五)Store Procedure篇》
《Linq To Sql进阶系列(五)Store Procedure篇》            

int
 returnValue 
=
 

1
;
《Linq To Sql进阶系列(五)Store Procedure篇》            var q 

=
 db.Customers_By_City2(

London

,
out
 returnValue);
《Linq To Sql进阶系列(五)Store Procedure篇》            Console.WriteLine(returnValue);
也可以使用result.GetParameterValue方法获取返回值。只是linq会检查影射函数的参数个数。这个使用起来比较麻烦。可以这么使用,比如,有一个sprocs,有2个参数,其中有一个out的参数。这个out的参数,可以不做任何操作。在影射后,修改其code。这两个参数的位标是从0开始,依次递增。其code本来为outParameter =  ((System.
Nullable<
int>)(result.GetParameterValue(1))); 将其索引修改位为2,就是return value了。再大了又该抛了。

ps:招聘,我就趁机打个广告吧.呵呵。赴微软测试工程师

1, 计算机或软件,相关专业,本科或硕士以上。
2, 2年及2年以上工作经验。
3, 英语,听说读写流利。
4, 工作认真负责,学习能力强。
5, 精通c#1.1及c#2.0版本语言,对c#3.0有了解。
6, 精通算法。
7, 有Ado.Net 和Asp.Net的经验。技术好。

有意者投简历到
guoan@126.com 谢谢

相关文章:

ps:

C# 3.0 入门系列(一)

C# 3.0入门系列(二)

C# 3.0入门系列(三)

C# 3.0入门系列(四)-之Select操作

C#3.0入门系列(五)-之Where操作

C#3.0入门系列(六)-之OrderBy操作

C#3.0入门系列(七)–之OR工具介绍

C#3.0入门系列(八)-之GroupBy操作

C#3.0入门系列(九)-之GroupBy操作

C#3.0入门系列(十)-之Join操作

C#3.0入门系列(十一)-之In, Like操作

C#3.0入门系列(十二)-Lambda表达式中Lifting

Linq To Sql进阶系列(一)-从映射讲起

Linq To Sql进阶系列(二)M:M关系

Linq To Sql进阶系列(三)CUD和Log

Linq To Sql进阶系列(四)User Define Function篇

Linq To Sql进阶系列(五)Store Procedure篇

TrackBack:
http://www.cnblogs.com/126/archive/2007/08/16/851138.html

    原文作者:my favorite
    原文地址: https://www.cnblogs.com/hdjjun/archive/2008/11/05/1327097.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞