/// <summary> /// Sets the Id generator convention. /// </summary> /// <param name="convention">An Id generator convention.</param> /// <returns>The convention profile.</returns> public ConventionProfile SetIdGeneratorConvention( IIdGeneratorConvention convention ) { IdGeneratorConvention = convention; return(this); }
/// <summary> /// Initializes a new instance of the <see cref="ConventionProfile"/> class. /// </summary> public ConventionProfile() { _aliasConvention = new DelegateAliasConvention(m => m.Name); _collectionNameConvention = new DelegateCollectionNameConvention(t => t.Name); _collectionAdapterConvention = DefaultCollectionAdapterConvention.Instance; _defaultValueConvention = DefaultDefaultValueConvention.Instance; _dictionaryAdapterConvention = DefaultDictionaryAdapterConvention.Instance; _discriminatorConvention = new DelegateDiscriminatorConvention(t => t.Name); _discriminatorAliasConvention = new DelegateDiscriminatorAliasConvention(t => "_t"); _extendedPropertiesConvention = new DelegateExtendedPropertiesConvention(m => m.Name == "ExtendedProperties"); _idConvention = new DelegateIdConvention(m => m.Name == "Id"); _idGeneratorConvention = DefaultIdGeneratorConvention.Instance; _idUnsavedValueConvention = DefaultIdUnsavedValueConvention.Instance; }
/// <summary> /// Uses the id generator convention. /// </summary> /// <param name="idGeneratorConvention">The id generator convention.</param> /// <returns></returns> public AutoMappingProfileBuilder UseIdGeneratorConvention(IIdGeneratorConvention idGeneratorConvention) { _profile.Conventions.IdGeneratorConvention = idGeneratorConvention; return this; }
public IdGeneratorConventionAdapter(IIdGeneratorConvention convention) { _convention = convention; }
public IdGeneratorConventionAdapter(IIdGeneratorConvention convention) { _convention = convention; }
/// <summary> /// Sets the Id generator convention. /// </summary> /// <param name="convention">An Id generator convention.</param> /// <returns>The convention profile.</returns> public ConventionProfile SetIdGeneratorConvention(IIdGeneratorConvention convention) { IdGeneratorConvention = convention; return this; }
/// <summary> /// Uses the id generator convention. /// </summary> /// <param name="idGeneratorConvention">The id generator convention.</param> /// <returns></returns> public AutoMappingProfileBuilder UseIdGeneratorConvention(IIdGeneratorConvention idGeneratorConvention) { _profile.Conventions.IdGeneratorConvention = idGeneratorConvention; return(this); }
/// <summary> /// Initializes a new instance of the <see cref="ConventionProfile"/> class. /// </summary> public ConventionProfile() { _aliasConvention = new DelegateAliasConvention(m => m.Name); _collectionNameConvention = new DelegateCollectionNameConvention(t => t.Name); _collectionAdapterConvention = DefaultCollectionAdapterConvention.Instance; _defaultValueConvention = DefaultDefaultValueConvention.Instance; _dictionaryAdapterConvention = DefaultDictionaryAdapterConvention.Instance; _discriminatorConvention = new DelegateDiscriminatorConvention(t => t.Name); _discriminatorAliasConvention = new DelegateDiscriminatorAliasConvention(t => "_t"); _extendedPropertiesConvention = new DelegateExtendedPropertiesConvention(m => m.Name == "ExtendedProperties"); _idConvention = new DelegateIdConvention(m => m.Name == "Id"); _idGeneratorConvention = DefaultIdGeneratorConvention.Instance; _idUnsavedValueConvention = DefaultIdUnsavedValueConvention.Instance; }