开发者

Entity Framework 4 - Map Stored Proc that Returns Guid

Is there a way to map a stored proc in entity framework 4 that returns a guid scalar? All I see is to have it return a collection or an int scalar.

My stored proc ends with a

开发者_运维技巧
select @id

where @id is the Guid I want back in code.


No - function imports in EF4 always return collections that implement IEnumerable. You can have it return a collection of guid scalars - but in your case, it would just be a collection with one object. Does that work for you?

Brian

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜