/src/EntityFramework/ModelConfiguration/Conventions/Sets/V1ConventionSet.cs

# · C# · 57 lines · 52 code · 2 blank · 3 comment · 0 complexity · 43f0c8d8a01f51a8ec609b93da517571 MD5 · raw file

  1. namespace System.Data.Entity.ModelConfiguration.Conventions.Sets
  2. {
  3. using System.Diagnostics.CodeAnalysis;
  4. [SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
  5. internal static class V1ConventionSet
  6. {
  7. private static readonly IConvention[] _conventions
  8. = new IConvention[]
  9. {
  10. // Type Configuration
  11. new NotMappedTypeAttributeConvention(),
  12. new ComplexTypeAttributeConvention(),
  13. new TableAttributeConvention(),
  14. // Property Configuration
  15. new NotMappedPropertyAttributeConvention(),
  16. new KeyAttributeConvention(),
  17. new RequiredPrimitivePropertyAttributeConvention(),
  18. new RequiredNavigationPropertyAttributeConvention(),
  19. new TimestampAttributeConvention(),
  20. new ConcurrencyCheckAttributeConvention(),
  21. new DatabaseGeneratedAttributeConvention(),
  22. new MaxLengthAttributeConvention(),
  23. new StringLengthAttributeConvention(),
  24. new ColumnAttributeConvention(),
  25. new InversePropertyAttributeConvention(),
  26. new ForeignKeyPrimitivePropertyAttributeConvention(),
  27. // EDM
  28. new IdKeyDiscoveryConvention(),
  29. new AssociationInverseDiscoveryConvention(),
  30. new ForeignKeyNavigationPropertyAttributeConvention(),
  31. new OneToOneConstraintIntroductionConvention(),
  32. new NavigationPropertyNameForeignKeyDiscoveryConvention(),
  33. new PrimaryKeyNameForeignKeyDiscoveryConvention(),
  34. new TypeNameForeignKeyDiscoveryConvention(),
  35. new ForeignKeyAssociationMultiplicityConvention(),
  36. new OneToManyCascadeDeleteConvention(),
  37. new ComplexTypeDiscoveryConvention(),
  38. new StoreGeneratedIdentityKeyConvention(),
  39. new PluralizingEntitySetNameConvention(),
  40. new DeclaredPropertyOrderingConvention(),
  41. new PluralizingTableNameConvention(),
  42. new ColumnOrderingConvention(),
  43. new ColumnTypeCasingConvention(),
  44. new SqlCePropertyMaxLengthConvention(),
  45. new PropertyMaxLengthConvention(),
  46. new DecimalPropertyConvention(),
  47. new ManyToManyCascadeDeleteConvention(),
  48. new MappingInheritedPropertiesSupportConvention()
  49. };
  50. public static IConvention[] Conventions
  51. {
  52. get { return _conventions; }
  53. }
  54. }
  55. }