Webistrate - Draw Your Own Conclusions

ASP.NET: Entity Framework’s Code-First with an ObjectContext

Posted by Jamie Munro | April 30, 2012 | Tags: , , ,

If the following blog interests you, it’s probably because you’re using Entity Framework with a Code-First approach and whatever it is you are trying to do *must* use an ObjectContext instead of the standard DbContext.  I’m sure, like me, you thought this shouldn’t be too hard.  Then you started hitting roadblocks like, Metadata is required in your connection string.  What’s metadata?  This is only needed in Database-First so you can tell the framework where your edmx and other definition files are, so why do I need this with Code-First, I don’t have these files?

This was definitely my first reaction as well.  So after much trial-and-error and research, I have the solution!

See the solution »

Share


Buy one of my books