通过下面的代码,你就可以拿到EF心中的地图 —— edmx文件。

using (var context = new Context())
{
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true; using (XmlWriter writer = XmlWriter.Create(@"Model.edmx", settings))
{
EdmxWriter.WriteEdmx(context, writer);
}
}
05-08 08:45