C# Class System.Data.Entity.Infrastructure.EdmxWriter

Contains methods used to access the Entity Data Model created by Code First in the EDMX form. These methods are typically used for debugging when there is a need to look at the model that Code First creates internally.
显示文件 Open project: aspnet/EntityFramework6 Class Usage Examples

Public Methods

Method Description
WriteEdmx ( DbContext context, XmlWriter writer ) : void

Uses Code First with the given context and writes the resulting Entity Data Model to the given writer in EDMX form. This method can only be used with context instances that use Code First and create the model internally. The method cannot be used for contexts created using Database First or Model First, for contexts created using a pre-existing ObjectContext, or for contexts created using a pre-existing DbCompiledModel.

WriteEdmx ( System.Data.Entity.Infrastructure.DbModel model, XmlWriter writer ) : void

Writes the Entity Data Model represented by the given DbModel to the given writer in EDMX form.

Method Details

WriteEdmx() public static method

Uses Code First with the given context and writes the resulting Entity Data Model to the given writer in EDMX form. This method can only be used with context instances that use Code First and create the model internally. The method cannot be used for contexts created using Database First or Model First, for contexts created using a pre-existing ObjectContext, or for contexts created using a pre-existing DbCompiledModel.
public static WriteEdmx ( DbContext context, XmlWriter writer ) : void
context DbContext The context.
writer System.Xml.XmlWriter The writer.
return void

WriteEdmx() public static method

Writes the Entity Data Model represented by the given DbModel to the given writer in EDMX form.
public static WriteEdmx ( System.Data.Entity.Infrastructure.DbModel model, XmlWriter writer ) : void
model System.Data.Entity.Infrastructure.DbModel An object representing the EDM.
writer System.Xml.XmlWriter The writer.
return void