开发者

Linq to sql select db_id()

开发者 https://www.devze.com 2023-02-06 15:29 出处:网络
How to make query for db_id() in Linq to SQL. P开发者_运维技巧Lease help.Expose it as a function or stored procedure.You even can map method to the standard function. Add following code in the dbml an

How to make query for db_id() in Linq to SQL. P开发者_运维技巧Lease help.


Expose it as a function or stored procedure.


You even can map method to the standard function. Add following code in the dbml and use dataContext.DbId() (you can use it inside query also):


<Function Name="db_id" Method="DbId" IsComposable="true">
  <Return Type="System.Int32" />
</Function>
0

精彩评论

暂无评论...
验证码 换一张
取 消