I want to load EF metadata from database at runtime. Is that scenario possible? First get the data from database, then write it to .ssdl, .msl and .csdl files sounds ok. But how to tell EF to use what I've loaded? Do I need to compile it or something like that?
Asked
Active
Viewed 548 times
1 Answers
3
Yes, you can do that.
New up a MetadataWorkspace
using the constructor which takes these files.
Then you can new up an EntityConnection
passing the MetadataWorkspace
to the overloaded constructor, and finally new the ObjectContext
passing that.
With all that said, I wonder if this is the best approach to your problem.

Craig Stuntz
- 125,891
- 12
- 252
- 273