Barefoot learning LINQ (033): the two entity classes that establish mappings must contain a primary key column Member respectively.

Source: Internet
Author: User

Http://u.115.com/file/f2cb57bffb demo

Demonstration highlights
The two entity classes that establish the ing relationship must respectively contain a primary key column member, such as the primary key attribute or primary key field.
Under normal circumstances, the primary key column members should be the primary key columns mapped to the data table.
If you change the primary key column members of the two object classes to normal members in the object link designer, although the dbml file still retains the ing relationship, however, the object link designer does not generate code for ing.
In addition, only one primary key column member is required for the two entity classes to establish the ing relationship. It is not mandatory that these primary key column members do not map to the primary key column of the data table.

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.