Issue Details (XML | Word | Printable)

Key: DNET-796
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Jiri Cincura
Reporter: Roberto Carlos da Silva
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
.NET Data provider

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

Created: 21/Nov/17 10:50 PM   Updated: 24/Jul/19 07:25 AM
Component/s: Entity Framework, Entity Framework Core
Affects Version/s:,
Fix Version/s: None

Environment: ADO.NET framework, entity Framework

 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jiri Cincura added a comment - 22/Nov/17 04:35 AM - edited
That's interesting request. Can you share what " various system and framework migration incompatibility issues" you'd solve with it? Because I don't see it there (except for some hacky situations).

Roberto Carlos da Silva added a comment - 22/Nov/17 02:09 PM
First of all I would like you to know that I appreciate your work as a .NET Driver Developer for Firebird. I'm also a big firebird enthusiast, having suggested and implemented this SGDB on major projects like the Unimed Enterprise management system that I worked on. Now with respect to the problems faced, in the current company I work for. We use ASPNETZERO ( as well as ASPNETBOILERPLATE ( which are two widely used frameworks for large enterprises. It works very well with databases (Sql Server, oracle, mysql) but due to a limitation in the Firebird EntityFramework drive that does not allow mapping the data type (Byte or tinyint) I can not use the database First feature. I would love to be able to use firebird with this framework but unfortunately I am not getting through a basic mapping limitation. This is why I suggest a way to change the mapping of the numeric type to a configuration that could be in the configuration file or otherwise. I believe that this would also make the migration of other systems and also frameworks that work in other databases easier. I already tried to change the mapping in OnModelCreating I also tried to create a DOMAIN with the tinyint name, but the problem is that essentially the mapped type does not change.

Jiri Cincura added a comment - 29/Nov/17 09:10 AM
Thinking where overriding the property to i.e. smallint with "public new short FooBar { get; set; }" would break it. Of course that would be some work.

Anyway, there's already a hack for missing pre-FB3 bool type with smallint_bool EdmType. Although that was needed for SSDL mappings to even work. I suppose similar hack can be done for byte. I don't personally like the idea of having it configurable. That adds unneeded complexity.

Same should be done also for EF Core.

Jiri Cincura added a comment - 29/Nov/17 09:12 AM
I'll schedule it after 6.0 is finished.

Roberto Carlos da Silva added a comment - 29/Nov/17 03:07 PM
Thank you! This adjustment will help me a lot!