File tree 2 files changed +16
-1
lines changed
src/EFCore.Relational/Storage
test/EFCore.Relational.Tests/Storage
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ static string GetBaseName(string storeType)
298
298
var openParen = storeType . IndexOf ( "(" , StringComparison . Ordinal ) ;
299
299
if ( openParen >= 0 )
300
300
{
301
- storeType = storeType [ ..openParen ] ;
301
+ storeType = storeType [ ..openParen ] . TrimEnd ( ) ;
302
302
}
303
303
304
304
return storeType ;
Original file line number Diff line number Diff line change @@ -222,6 +222,21 @@ public void Does_type_mapping_from_decimal_type_with_configuration()
222
222
Assert . False ( mapping . IsFixedLength ) ;
223
223
}
224
224
225
+ [ ConditionalFact ]
226
+ public void StoreTypeNameBase_is_trimmed ( )
227
+ {
228
+ var mapping = GetTypeMapping (
229
+ typeof ( string ) ,
230
+ storeTypeName : "ansi_string_fixed (666)" ,
231
+ useConfiguration : true ) ;
232
+
233
+ Assert . Equal ( "ansi_string_fixed (666)" , mapping . StoreType ) ;
234
+ Assert . Equal ( "ansi_string_fixed" , mapping . StoreTypeNameBase ) ;
235
+ Assert . Equal ( 666 , mapping . Size ) ;
236
+ Assert . False ( mapping . IsUnicode ) ;
237
+ Assert . False ( mapping . IsFixedLength ) ;
238
+ }
239
+
225
240
protected override IRelationalTypeMappingSource CreateRelationalTypeMappingSource ( )
226
241
=> new TestRelationalTypeMappingSource (
227
242
TestServiceFactory . Instance . Create < TypeMappingSourceDependencies > ( ) ,
You can’t perform that action at this time.
0 commit comments