摘要:
Entity Framework 5引入了表值函数(Table-Valued Functions TVFs)。表值函数的返回类型是一个Table类型,可用在SQL查询语句中。最简单的表值函数,读取客户表的记录,参考如下代码:CREATE FUNCTION GetCustomersreturn tableASreturn ( SELECT * FROM Customer) ;此外,表值函数还可以指定要返回的表的列名和函数参数,请参考下面的代码例子:CREATE FUNCTION GetCustomer(@customerNo nvarchar(50))returns table AS... 阅读全文