通过下面的代码,你就可以拿到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); } }
时间: 2024-10-27 17:20:54