I have a .NET Core project where I use EF Core to scaffold our MySql database (db first approach). I'm not able to make EF Core to map tinyint or bit as bool. It maps tinyint to byte and bit to short. Does anyone have any ideas?
Make sure you're using Pomelo.EntityFrameworkCore.MySql as your MySQL EF Core provider. (It already supports EF Core 3.0 and is more reliable than Oracle's package.)
Since 3.0, mapping TINYINT(1) to System.Boolean is the default (reference), as long as your connection string includes TreatTinyAsBoolean=True (which is the default setting if not explicitly set).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With