开发者

Entity Framework 4.0 and Stored Procedures

Are there any examples/articles on how to use the Entity Framework 4.0 Code First model (no edmx or xml configuration anywhere!!!开发者_如何学运维) that interacts with stored procedures? Another aspect to my requirements is I am using a Repository pattern that uses an IRepository interface to abstract the actual data store (memory, database, xml, etc). Thus, I suppose it would be a hack to expose the ObjectContext so that I can call ExecuteFunction(...) on the ObjectContext instance since the caller of IRepository can never assume it is hitting a database. I was hoping to specify all stored procedure mapping logic in my mapping class for the entity. The mapping class is a subclass of EntityConfiguration. Is the 4.0 CTP mature enough for this yet?


I know it's a bit late now, but here is something worthwhile looking into: Entity Framework CTP5 - How to Call Stored Procedure? and Using stored procedures with Entity Framework 4 Code First CTP5. Did you manage with this?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜