У меня есть скалярнозначная функция в моей базе данных sql.
Я получаю эту ошибку при импорте этой функции в модель Entity Framework:
Error 6046: Unable to generate function import return type of the store function 'GetContentByIdAndCul'.
The store function will be ignored and the function import will not be generated. ..\EntityModels.edmx
Моя функция tsql:
ALTER FUNCTION [FRM].[GetContentByIdAndCul]
(@Id int,@Culture nvarchar(5))
RETURNS nvarchar(max)
AS
BEGIN
declare @Result nvarchar(max)
if @Id is not null
set @Result='This Content not defined in this Language'
select @Result=Value from CUL.Contents
WHERE [email protected] AND (CUL.Contents.Culture = LOWER(@Culture)
OR CUL.Contents.Culture = LOWER(SUBSTRING(@Culture,1,2)))
return @Result
END