NETProvider icon indicating copy to clipboard operation
NETProvider copied to clipboard

Entity Framework Core Firebird can't scaffold columns with NUMERIC type

Open Camel-RD opened this issue 1 year ago • 1 comments

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.

Camel-RD avatar Sep 10 '24 08:09 Camel-RD

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.

gilsonjoanelo avatar Sep 25 '24 23:09 gilsonjoanelo

Dupe of #1141.

cincuranet avatar Nov 07 '24 10:11 cincuranet