/// <summary> /// Configures the MicroLite ORM Framework to use attribute based mapping instead of the default convention based mapping. /// </summary> /// <param name="configureExtensions">The interface to configure extensions.</param> /// <returns>The interface which provides the extension points.</returns> /// <exception cref="System.ArgumentNullException">Thrown if any argument is null.</exception> public static IConfigureExtensions WithAttributeBasedMapping( this IConfigureExtensions configureExtensions) { if (configureExtensions is null) { throw new ArgumentNullException(nameof(configureExtensions)); } configureExtensions.SetMappingConvention(new AttributeMappingConvention()); return(configureExtensions); }
/// <summary> /// Configures the MicroLite ORM Framework to use custom convention settings for the default convention based mapping. /// </summary> /// <param name="configureExtensions">The interface to configure extensions.</param> /// <param name="settings">The settings for the convention mapping.</param> /// <returns>The interface which provides the extension points.</returns> /// <exception cref="System.ArgumentNullException">Thrown if any argument is null.</exception> public static IConfigureExtensions WithConventionBasedMapping( this IConfigureExtensions configureExtensions, ConventionMappingSettings settings) { if (configureExtensions is null) { throw new ArgumentNullException(nameof(configureExtensions)); } if (settings is null) { throw new ArgumentNullException(nameof(settings)); } configureExtensions.SetMappingConvention(new ConventionMappingConvention(settings)); return(configureExtensions); }
public WhenCallingExtensionsMultipleTimes() { this.extensions1 = Configure.Extensions(); this.extensions2 = Configure.Extensions(); }