/// <summary> /// Creates a new instance of a <see cref="DbCommand"/> for the stored procedure with the specified <paramref name="state"/> /// </summary> /// <param name="stored"> /// The stored. /// </param> /// <param name="state"> /// The state. /// </param> /// <returns> /// a new instance of a <see cref="DbCommand"/> for the stored procedure with the specified <paramref name="state"/> /// </returns> /// <remarks> /// It sets the following <see cref="DbCommand"/> properties <see cref="DbCommand.Connection"/> , <see cref="DbCommand.Transaction"/> , <see cref="DbCommand.CommandType"/> and <see cref="DbCommand.CommandText"/> /// </remarks> public static DbCommand CreateCommand(this IProcedure stored, DbTransactionState state) { return(stored.CreateCommand(state.Connection, state.Transaction)); }