In Chapter 2, you created your first Entity Data Model and inspected it in the Entity Data Model Designer as well as looking at the raw XML.
There are some portions of the metadata that you might never need to work with and they were not included in that chapter. Those details are listed in this appendix in case you have a need for them.
The EDMX file leverages schema files for validation. To see a
schema’s rules in action, try editing the XML manually. For example,
start entering a new
element inside the
EntityType. IntelliSense will provide a list of options within
the property. Alternatively, you can intentionally break something! For
example, change the spelling of an element name—perhaps change
ElephantType. The XML will provide visual
clues to indicate that something is amiss, and the Errors List will list
warnings regarding any invalid elements. Don’t forget to undo these
The outer element,
defines the name of the entire model’s namespace, which in this case
SampleModel. The namespace is
defined by default to have the name of the database from which the
model is derived, plus the word Model. The schema
also defines an
Alias, which by
Self. This is just a
nickname for the model and you can name it anything you like. There is
xmlns namespace URI, which defines the ...