Description
...as a result, parameters for datetime2, time and datetimeoffset will always have a "fractional seconds precision" of 7 despite being explicitly mapped with a different "precision"
I believe this largely resulted from the fact that in SQLClient, it is the "Scale" property of an SqlParameter that determines the "fractional seconds precision" of the type, not the "Precision" for datetime2, time and datetimeoffset types.
where that should be
parameter.Scale = unchecked((byte)Precision.Value);
for datetime2, time and datetimeoffset types
dotnet/SqlClient#1380 still prevents the correct output when fractional seconds precision is explicitly set to zero though.
Pull request with failing test and fix forthcoming, just need to create the issue first to have something to reference back to..