Skip to content

Commit b467844

Browse files
committed
.Net 8
1 parent 117deac commit b467844

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/ConnectionExtensionsExamples/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
.ConfigureProperty(x => x.RowVersion, readOnly: true)
2727
.ConfigureProperty(x => x.SeasonAsString, columnType: "nvarchar(max)")
2828
.ConfigurePropertyConversion(x => x.SeasonAsString, y => y.ToString(), z => (Season)Enum.Parse(typeof(Season), z))
29-
.ParameterConverter((data, propertyName) =>
29+
.ParameterConverter((data, propertyName, parameterName) =>
3030
{
3131
if (propertyName == "CreatedDateTime")
3232
{
33-
return new SqlParameter($"@__{propertyName}", data.CreatedDateTime);
33+
return new SqlParameter(parameterName, data.CreatedDateTime);
3434
}
3535

3636
return null;

src/EntityFrameworkCore.SqlServer.SimpleBulks/SqlTableInforBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class SqlTableInforBuilder<T>
2727

2828
private OutputId _outputId;
2929

30-
private Func<T, string, SqlParameter> _parameterConverter;
30+
private Func<T, string, string, SqlParameter> _parameterConverter;
3131

3232
private Discriminator _discriminator;
3333

@@ -78,7 +78,7 @@ public SqlTableInforBuilder<T> OutputId(Expression<Func<T, object>> nameSelector
7878
return OutputId(propertyName, outputIdMode);
7979
}
8080

81-
public SqlTableInforBuilder<T> ParameterConverter(Func<T, string, SqlParameter> converter)
81+
public SqlTableInforBuilder<T> ParameterConverter(Func<T, string, string, SqlParameter> converter)
8282
{
8383
_parameterConverter = converter;
8484
return this;

src/EntityFrameworkCore.SqlServer.SimpleBulks/TableInfor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public override List<ParameterInfo> CreateSqlParameters(SqlCommand command, T da
252252

253253
public class SqlTableInfor<T> : TableInfor<T>
254254
{
255-
public Func<T, string, SqlParameter> ParameterConverter { get; init; }
255+
public Func<T, string, string, SqlParameter> ParameterConverter { get; init; }
256256

257257
public SqlTableInfor(string schema, string tableName) : base(schema, tableName)
258258
{
@@ -268,7 +268,7 @@ public override List<ParameterInfo> CreateSqlParameters(SqlCommand command, T da
268268

269269
foreach (var propName in propertyNames)
270270
{
271-
var para = ParameterConverter?.Invoke(data, propName);
271+
var para = ParameterConverter?.Invoke(data, propName, CreateParameterName(propName));
272272

273273
if (para == null)
274274
{

0 commit comments

Comments
 (0)