Scattered records of mvc3-Ef Common conversion rules

Source: Internet
Author: User

• Associationinversediscoveryconvention
Search for the attributes of the classes referenced in the navigation and configure them as the same relationship of the inverse attributes.

• Complextypediscoveryconvention
Find the types with or without primary keys and configure them as complex types.

• Declaredpropertyorderingconvention
Ensure that the primary key attributes of each object take precedence over other attributes.

• Foreignkeyassociationmultiplicityconvention
Whether the configuration is required or optional is based on the null foreign key attribute, if included in the class definition.

• Idkeydiscoveryconvention
Search for the attributes named ID or <typename> ID and configure them as the primary key.

• Navigationpropertynameforeignkeydiscoveryconvention
Use the foreign key relationship and the <navigationproperty> <primarykeyproperty> mode as the attribute appearance.

• Onetomanycascadedeleteconvention
The relationship required for the switch to be deleted.

• Onetooneconstraintintroductionconvention
It is configured as a primary key for a foreign key of a link.

• Pluralizingentitysetnameconvention
Name of the entity set in the object data model configured as a diverse type name.

• Primarykeynameforeignkeydiscoveryconvention
Use the foreign key relationship and the <primarykeyproperty> mode as the attribute appearance.

• Propertymaxlengthconvention
Configure all the string and byte [] attributes, with the maximum length by default.

• Storegeneratedidentitykeyconvention
By default, the primary keys of All integers are identified.

• Typenameforeignkeydiscoveryconvention
Use the <principaltypename> <primarykeyproperty> mode as the appearance of the property.


You technology, professional web data capture and analysis Crawlers

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.