实体框架误导存储过程对函数导入新手

时间:2013-03-21 21:33:09

标签: entity-framework

我不是ef的专家所以这几乎可以肯定是我的错,但是这里......

任何想法为什么这个sp被导入到ef中,并且ef说它没有输出?

SELECT TaxiAuthority.AuthorityID, [Cardiff_region_1].NAME
FROM [Cardiff_region] AS [Cardiff_region_1] INNER JOIN YourCompany_TaxiAuthority ON Cardiff_region_1].ID = TaxiAuthority.LALinkID WHERE geom.STIntersects(@point) = 1;

1 个答案:

答案 0 :(得分:1)

SQL不解析。你有:

SELECT  TaxiAuthority.AuthorityID, [Cardiff_region_1].NAME
FROM    [Cardiff_region] AS [Cardiff_region_1] 
        INNER JOIN YourCompany_TaxiAuthority ON Cardiff_region_1].ID = TaxiAuthority.LALinkID 
WHERE geom.STIntersects(@point) = 1;

TaxiAuthority不存在。试试:

SELECT  TaxiAuthority.AuthorityID, [Cardiff_region_1].NAME
FROM    [Cardiff_region] AS [Cardiff_region_1] 
        INNER JOIN YourCompany_TaxiAuthority AS [TaxiAuthority] ON [Cardiff_region_1].ID = TaxiAuthority.LALinkID 
WHERE geom.STIntersects(@point) = 1;