开发者

How to map Stored Procedures with EF4?

开发者 https://www.devze.com 2022-12-22 11:19 出处:网络
Is it possible to map stored procédures whit EF 4 using T4 templates ? I have s开发者_开发百科earched and I conclude that it is not possible yet.

Is it possible to map stored procédures whit EF 4 using T4 templates ? I have s开发者_开发百科earched and I conclude that it is not possible yet.

It exist some methods like Edm.SourceComplexTypes(), Edm.SourceAssociations(), Edm.SourceEntities() but nothing about stored procedures ...

Someone have any answer ?

Thanks.


I'm doing it. Just open your edmx, right click on the design surface and select Add > Function Import. You can map the results of the SP to an existing entity or to a new entity type.

After doing this, transform all the templates in the solution and you should be good to go.

0

精彩评论

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