Linq to sql select db_id()
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>
精彩评论