ralmsdeveloper / EntityFrameworkCore.FirebirdSQL

FirebirdSQL database provider for Entity Framework Core.
Other
44 stars 26 forks source link

Mapping numeric types in the same configurable way you can do in Oracle #12

Closed robertosistemas closed 6 years ago

robertosistemas commented 6 years ago

It would be great if in the Firebird .NET Drive there was a way to map the same numeric types you can do in the Oracle Driver. It would solve various system and framework migration incompatibility issues and make it easier to choose firebird as a database for the .NET platform. I think it would be very easy to do that.

https://docs.oracle.com/database/121/ODPNT/entityDataTypeMapping.htm#ODPNT8300

ralmsdeveloper commented 6 years ago

Hello @robertosistemas Very cool your questioning. This is a problem being analyzed, the EF team also plans to implement this. I want to add this in the next version 2.1.

I remember there is a workaround for that.

Using the:

protected override void OnModelCreating(ModelBuilder modelo)
{
    modelo.Entity<Product>()
        .Property(p => p.Price)
        .HasColumnType("DECIMAL(18,2)");

    base.OnModelCreating(modelo);
}

Thank you.