Entity Data Model (EDM) in-depth analysis, Part 1

Source: Internet
Author: User
Tags documentation object model

The Entity Data model is a new feature introduced in the. NET Framework v3.5 SP1, a more powerful ORM than LINQ to SQL, allowing developers to focus only on the development of the domain object model without considering how they interact with relational databases. This series of articles delves into the following: EDMX Schema files, Model Browser, mapping relationships, resulting entity classes (generated entity classes), documentation (documentation), and more.

1. EDMX Schema File

You can open EDMX as an XML file, and you'll find that the file contains 3 main sections.

Conceptual Models (CSDL)

Storage Models (SSDL)

Mapping (MSL)

In general, you do not need to manually modify the Edmx-xml file. The visual EDM Designer, Mapping Details window, and Model Browser window contain these 3 parts and are very friendly to display the entire entity Data model.

When you compile the project, MSBuild extracts the CSDL/SSDL/MSL content from the edmx file and places 3 separate XML files into the project's output directory.

2. Model Browser window

The Model browser window displays the conceptual model and the storage model visually tree.

3. Mapping Details window

The EDM Designer also provides a nice mapping Details window that contains 2 views.

Map Entity to Tables/view

This view shows the properties in all fields and corresponding entities in the database that you can use to view and edit the mapping relationships of the EDM.

Map Entity to functions

This view is used to select a particular stored procedure to insert, UPDATE, or delete the entity instance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.