Example #1
0
 /// <summary>
 /// Allows compilation of the ToObject and ToCollection materializer.
 /// </summary>
 /// <typeparam name="TCommand">The type of the command.</typeparam>
 /// <typeparam name="TParameter">The type of the parameter.</typeparam>
 /// <param name="commandBuilder">The command builder.</param>
 /// <returns></returns>
 public static CompiledMultipleRow <TCommand, TParameter> Compile <TCommand, TParameter>(this MultipleRowDbCommandBuilder <TCommand, TParameter> commandBuilder)
     where TCommand : DbCommand
     where TParameter : DbParameter
 {
     return(new CompiledMultipleRow <TCommand, TParameter>(commandBuilder));
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ObjectMultipleRow{TCommand, TParameter, TObject}" /> struct.
 /// </summary>
 /// <param name="commandBuilder">The command builder.</param>
 public ObjectMultipleRow(MultipleRowDbCommandBuilder <TCommand, TParameter> commandBuilder)
 {
     m_CommandBuilder = commandBuilder;
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CompiledMultipleRow{TCommand, TParameter}" /> struct.
 /// </summary>
 /// <param name="commandBuilder">The command builder.</param>
 public CompiledMultipleRow(MultipleRowDbCommandBuilder <TCommand, TParameter> commandBuilder)
 {
     m_CommandBuilder = commandBuilder;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultipleRowDbCommandBuilder{TCommand, TParameter, TObject}"/> class.
 /// </summary>
 /// <param name="commandBuilder">The command builder.</param>
 /// <exception cref="System.ArgumentNullException">commandBuilder</exception>
 public MultipleRowDbCommandBuilder(MultipleRowDbCommandBuilder <TCommand, TParameter> commandBuilder)
     : base(commandBuilder?.DataSource ?? throw new ArgumentNullException(nameof(commandBuilder), $"{nameof(commandBuilder)} is null."))
 {
     m_CommandBuilder = commandBuilder ?? throw new ArgumentNullException(nameof(commandBuilder), $"{nameof(commandBuilder)} is null.");
 }