共用方式為


EdmxWriter.WriteEdmx 方法

定義

多載

WriteEdmx(DbContext, XmlWriter)

搭配給定的內容使用 Code First 並將產生的實體資料模型寫入 EDMX 表單中的給定寫入器。 這個方法只能搭配使用 Code First 並在內部建立模型的內容執行個體一起使用。 方法不能用於使用 Database First 或 Model First 建立的內容、使用預先存在的 ObjectContext 建立的內容,或針對使用預先存在的 DbCompiledModel 所建立的內容使用。

WriteEdmx(DbModel, XmlWriter)

以 EDMX 形式,將指定的 DbModel 所代表的實體資料模型寫入指定的寫入器。

WriteEdmx(DbContext, XmlWriter)

搭配給定的內容使用 Code First 並將產生的實體資料模型寫入 EDMX 表單中的給定寫入器。 這個方法只能搭配使用 Code First 並在內部建立模型的內容執行個體一起使用。 方法不能用於使用 Database First 或 Model First 建立的內容、使用預先存在的 ObjectContext 建立的內容,或針對使用預先存在的 DbCompiledModel 所建立的內容使用。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Edmx")]
public static void WriteEdmx(System.Data.Entity.DbContext context, System.Xml.XmlWriter writer);
public static void WriteEdmx(System.Data.Entity.DbContext context, System.Xml.XmlWriter writer);
static member WriteEdmx : System.Data.Entity.DbContext * System.Xml.XmlWriter -> unit
Public Shared Sub WriteEdmx (context As DbContext, writer As XmlWriter)

參數

context
DbContext

內容。

writer
XmlWriter

寫入器。

屬性

適用於

WriteEdmx(DbModel, XmlWriter)

以 EDMX 形式,將指定的 DbModel 所代表的實體資料模型寫入指定的寫入器。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Edmx")]
public static void WriteEdmx(System.Data.Entity.Infrastructure.DbModel model, System.Xml.XmlWriter writer);
public static void WriteEdmx(System.Data.Entity.Infrastructure.DbModel model, System.Xml.XmlWriter writer);
static member WriteEdmx : System.Data.Entity.Infrastructure.DbModel * System.Xml.XmlWriter -> unit
Public Shared Sub WriteEdmx (model As DbModel, writer As XmlWriter)

參數

model
DbModel

表示 EDM 的物件。

writer
XmlWriter

寫入器。

屬性

適用於