Entity Framework 6为复杂存储过程返回错误类型
问题描述:
我有一个存储过程,因为它的结果显式列出了许多列。当我将存储过程添加到实体框架v6时,它不会添加_result.cs
文件,并且它将存储过程看作是简单地返回一个int。Entity Framework 6为复杂存储过程返回错误类型
任何人都可以看到我不是什么?
@UserIn int,
@Lat float,
@Lng float
AS
BEGIN
SET NOCOUNT ON;
declare @or geography, @dest geography
select @or = geography::Point(@Lat, @Lng, 4326)
select
Uid, SongKickId, SongKickArtistId, DisplayName, Type, Uri,
StartDate, StartDateTime, City, Lat, Lng, Capacity, ArtistId,
CreateDate, CreateUserId, IsActive, TwitterMsg, SocialMsg,
Cast(0.0 as float) as [dist]
from
SongKickEvent E
where
(E.Lat is not null and E.Lng is not null)
and cast(StartDate as Date) = cast(getdate() as Date)
END
这是整个SP吗?我认为EF无法发现输出列。 –
是的。我有另外一个SP,看起来就像这样(对我来说),而EF DOES将这些列分开。我似乎无法弄清楚如何发布。 – ebick
好的。我问,因为输入参数似乎没有做任何有用的事情。 –