在运行时更改模式名称 - 实体框架 [英] Changing schema name on runtime - Entity Framework

查看:176
本文介绍了在运行时更改模式名称 - 实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在运行时更改实体的存储模式。
我跟着一个很棒的帖子,可以在这里找到:
http://blogs.microsoft.co.il/blogs/idof/archive/2008/08/ 22 / change-entity-framework-storage-db-schema-in-runtime.aspx?CommentPosted = true#commentmessage



这样做完美,但只有

解决方案

>我已经设法通过使用位于CodePlex(由Brandon Haynes提供)的名为实体框架运行时模型适配器的辉煌图书馆解决了此问题:
http://efmodeladapter.codeplex.com/



我已经调整了一下,以满足我们的需要,而不需要更换设计师代码。



所以,我是好的,



无论如何,谢谢,特别是对布兰登,令人惊奇的工作!


I need to change the storage schema of the entities on runtime. I've followed a wonderful post, available here: http://blogs.microsoft.co.il/blogs/idof/archive/2008/08/22/change-entity-framework-storage-db-schema-in-runtime.aspx?CommentPosted=true#commentmessage

This works perfectly, but only for queries, not for modifications.

Any idea why?

解决方案

I've managed to resolve this issue by using a brilliant library, located in CodePlex (courtesy of Brandon Haynes), named "Entity Framework Runtime Model Adapter", available here: http://efmodeladapter.codeplex.com/

I've tweaked it a bit, to fit our needs and without the need of replacing the designer code at all.

So, I'm good.

Thanks anyways, and especially to Brandon, amazing job!

这篇关于在运行时更改模式名称 - 实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆