我正在尝试使用实体框架执行一个TVF,由于某种原因它只是不起作用.也许那里的任何人都可以帮助我看到问题.
以下是代码示例:
这是功能:
CREATE FUNCTION [dbo].[udf_profileSearch]
(@keywords NVARCHAR(3000))
RETURNS @results TABLE
(
[Id] [int] NULL,
[SubCategoryId] [int] NULL,
[UserId] [int] NULL,
[SmallDescription] [nvarchar](250) NULL,
[DetailedDescription] [nvarchar](500) NULL,
[Graduation] [nvarchar](140) NULL,
[Experience] [nvarchar](500) NULL,
[IsChat] [bit] NULL,
[IsEmail] [bit] NULL,
[MinuteCost] [decimal](18, 2) NOT NULL,
[TestimonyRate] [int] NULL,
[TestimonyQuantity] [int] NULL,
[StatusId] [int] NULL
)
AS
BEGIN
IF(@keywords != '')
BEGIN
insert @results
SELECT p.Id, p.SubCategoryId, p.UserId, p.SmallDescription, p.DetailedDescription, p.Graduation,
p.Experience, p.IsChat, p.IsEmail, p.MinuteCost, p.TestimonyRate, p.TestimonyQuantity,
p.StatusId FROM
Profile p inner …Run Code Online (Sandbox Code Playgroud) c# linq entity-framework user-defined-functions ef-code-first