NETProvider
NETProvider copied to clipboard
Entity Framework Core Firebird can't scaffold columns with NUMERIC type
When I try to scaffold a table with a column of type NUMERIC(x,y), I get this error "Could not find type mapping for column..."
It seems like FbTypeMappingSource doesn't have a case for NUMERIC column type.
There was a similar error with this one when mapping a company database. Since we use Code First, I solved it by putting this configuration in the mapping .HasColumnType("NUMERIC(15, 6)").
To declare it as an attribute, you have to use [Column(TypeName = "NUMERIC(15, 6)")], which also solves the problem. At least I no longer had the exception reported.
Dupe of #1141.