Skip to content

Commit bd84336

Browse files
authored
Add CreateParameter() to DbBatchCommand (#89503)
Closes #82326
1 parent 1aded3f commit bd84336

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/libraries/System.Data.Common/ref/System.Data.Common.cs

+2
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,8 @@ public abstract class DbBatchCommand
20012001
public abstract int RecordsAffected { get; }
20022002
public System.Data.Common.DbParameterCollection Parameters { get { throw null; } }
20032003
protected abstract System.Data.Common.DbParameterCollection DbParameterCollection { get; }
2004+
public virtual DbParameter CreateParameter() { throw null; }
2005+
public virtual bool CanCreateParameter { get { throw null; } }
20042006
}
20052007
public abstract class DbBatchCommandCollection : System.Collections.Generic.IList<DbBatchCommand>
20062008
{

src/libraries/System.Data.Common/src/System/Data/Common/DbBatchCommand.cs

+6
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,11 @@ public abstract class DbBatchCommand
1717
public DbParameterCollection Parameters => DbParameterCollection;
1818

1919
protected abstract DbParameterCollection DbParameterCollection { get; }
20+
21+
public virtual DbParameter CreateParameter()
22+
=> throw new NotSupportedException();
23+
24+
public virtual bool CanCreateParameter
25+
=> false;
2026
}
2127
}

0 commit comments

Comments
 (0)