@@ -48,17 +48,13 @@ public async Task Should_RoundtripDecimal_When_ValueFitsPrecisionAndScale(int p,
4848 {
4949 await using var ctx = NewCtx ( p , s ) ;
5050 await ctx . Database . EnsureCreatedAsync ( ) ;
51-
5251 try
5352 {
5453 var e = new ParamItem { Price = value } ;
5554 ctx . Add ( e ) ;
5655 await ctx . SaveChangesAsync ( ) ;
57-
5856 var got = await ctx . Items . SingleAsync ( x => x . Id == e . Id ) ;
59-
6057 Assert . Equal ( value , got . Price ) ;
61-
6258 var tms = ctx . GetService < IRelationalTypeMappingSource > ( ) ;
6359 var et = ctx . Model . FindEntityType ( typeof ( ParamItem ) ) ! ;
6460 var prop = et . FindProperty ( nameof ( ParamItem . Price ) ) ! ;
@@ -97,7 +93,7 @@ public async Task Should_SumDecimal_When_ValueFitsPrecisionAndScale(int p, int s
9793 await ctx . Database . EnsureCreatedAsync ( ) ;
9894 try
9995 {
100- for ( var i = 0 ; i < multiplier ; i ++ )
96+ for ( var i = 0 ; i < multiplier ; i ++ )
10197 ctx . Add ( new ParamItem { Price = value } ) ;
10298 await ctx . SaveChangesAsync ( ) ;
10399 var got = await ctx . Items . Select ( x => x . Price ) . SumAsync ( ) ;
@@ -123,7 +119,7 @@ public sealed class ParametricDecimalContext(DbContextOptions<ParametricDecimalC
123119
124120 protected override void OnModelCreating ( ModelBuilder modelBuilder ) => modelBuilder . Entity < ParamItem > ( b =>
125121 {
126- b . ToTable ( $ "Items_{ p } _{ s } ") ;
122+ b . ToTable ( $ "Items_{ p } _{ s } _ { Guid . NewGuid ( ) : N } ") ;
127123 b . HasKey ( x => x . Id ) ;
128124 b . Property ( x => x . Price ) . HasPrecision ( p , s ) ;
129125 } ) ;
0 commit comments