public void Scalar_Nested_Function_UDF_Client() { using (var context = CreateContext()) { var results = (from e in context.Employees where 127 == NorthwindDbFunctionContext.EmployeeOrderCountWithClient(AddOne(e.EmployeeID)) select e.EmployeeID).Single(); Assert.Equal(2, results); AssertSql( @"SELECT [e].[EmployeeID] FROM [Employees] AS [e]"); } }
public void Scalar_Nested_Function_UDF_BCL() { using (var context = CreateContext()) { var results = (from e in context.Employees where 127 == NorthwindDbFunctionContext.EmployeeOrderCountWithClient(Math.Abs(e.EmployeeID)) select e.EmployeeID).Single(); Assert.Equal(3, results); AssertSql( @"SELECT TOP(2) [e].[EmployeeID] FROM [Employees] AS [e] WHERE 127 = [dbo].EmployeeOrderCount(ABS([e].[EmployeeID]))"); } }