/// <summary> /// Creates a new column mapping using a strongly typed builder. /// </summary> /// <typeparam name="TEntity">The type of the entity.</typeparam> /// <param name="builder">The entity mapping builder.</param> /// <returns> /// A fluent <see langword="interface" /> to a <see cref="SqlBulkCopy " /> operation. /// </returns> public IDataBulkCopy Mapping <TEntity>(Action <DataBulkCopyMapping <TEntity> > builder) { var dataMapping = new DataBulkCopyMapping <TEntity>(this); builder(dataMapping); return(this); }
/// <summary> /// Creates a new column mapping using a strongly typed builder. /// </summary> /// <typeparam name="TEntity">The type of the entity.</typeparam> /// <param name="builder">The entity mapping builder.</param> /// <returns> /// A fluent <see langword="interface" /> to a <see cref="SqlBulkCopy " /> operation. /// </returns> /// <exception cref="ArgumentNullException"><paramref name="builder"/> is <see langword="null"/></exception> public IDataBulkCopy Mapping <TEntity>(Action <DataBulkCopyMapping <TEntity> > builder) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } var dataMapping = new DataBulkCopyMapping <TEntity>(this); builder(dataMapping); return(this); }