共用方式為


Building the Northwind Object Model (EDM)

An Entity Data Model (EDM) library is built from the conceptual schema. Preceding topics in this section describe Northwind Conceptual Schema (EDM); Northwind Storage Schema (EDM), and Northwind Mapping Schema (EDM). When ADO.NET is installed, an ADO.NET Entity Data Model template is added to the options available in Visual Studio. The template can be added to other projects and used to build programmable EDM libraries. The best way to generate these files is to use the ADO.NET Entity Data Model Designer.

The schemas shown in previous topics in this section are all necessary to build applications. The designer combines the schemas in a single file with the extension .edmx. When the model is build the schemas become resources included with the assembly. A separate code file that contains partial classes can be added to the project to implement methods that use the data types designed in schema. For more information about partial classes, see Helper Methods (EDM)

Building the project creates a DLL that contains a namespace and classes. The classes appear in the Object Browser in Visual Studio. Adding a reference to the DLL in a client project with preprocessor directive of the form using NorthwindLib makes the programmable classes in the namespace available for use in code.

See Also

Other Resources

EDM Specifications
Schemas and Mapping Specification (Entity Framework)
Sample Applications (Entity Framework)