Created
January 18, 2012 16:21
-
-
Save tjrobinson/1633831 to your computer and use it in GitHub Desktop.
Generate EDMX file from Entity Framework Code First Context
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See: http://social.msdn.microsoft.com/Forums/en-US/adonetefx/thread/4aa54da1-3099-48ef-9402-ca94cbca19eb/ | |
builder.DiscoverEntitiesFromContext(typeof(MyContext)); | |
DbModel model = builder.CreateModel(); | |
XmlWriter writer = new XmlTextWriter(Path + "MyContext.edmx", Encoding.UTF8); | |
model.WriteEdmx(conn, writer); | |
writer.Close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment