Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unchecks in SQL Server type mappings #30164

Merged
1 commit merged into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected override void ConfigureParameter(DbParameter parameter)
if (Precision.HasValue)
{
// Workaround for inconsistent definition of precision/scale between EF and SQLClient for VarTime types
parameter.Scale = unchecked((byte)Precision.Value);
parameter.Scale = (byte)Precision.Value;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected override void ConfigureParameter(DbParameter parameter)
{
// SQL Server accepts a scale, but in EF a scale along isn't supported (without precision).
// So the actual value is contained as precision in scale, but sent as Scale to SQL Server.
parameter.Scale = unchecked((byte)Precision.Value);
parameter.Scale = (byte)Precision.Value;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ protected override void ConfigureParameter(DbParameter parameter)

if (Precision.HasValue)
{
parameter.Precision = unchecked((byte)Precision.Value);
parameter.Precision = (byte)Precision.Value;
}

if (Scale.HasValue)
{
parameter.Scale = unchecked((byte)Scale.Value);
parameter.Scale = (byte)Scale.Value;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected override void ConfigureParameter(DbParameter parameter)

if (Precision.HasValue)
{
parameter.Scale = unchecked((byte)Precision.Value);
parameter.Scale = (byte)Precision.Value;
}
}

Expand Down