I have a hard time understanding why Entity Framework skips columns that are defined as decimal. I've tried deleting the model a couple of times and adding it back using the database first approach but for some reason a few columns are not mapped.
The ones that are defined as Date
, Int
or Text
have absolutely no problem. The ones that are giving me a hard time are the decimal ones and I have defined them as such:
If I create a view with sums based on that same table, EF has no problem identifying the decimal columns. How can I add the missing columns to my model? What am I doing wrong and is there a workaround?
Thank you
After spending hours on this I finally figured it out. If you are facing the same problem make sure that your column are not UNSIGNED .
For some reason Entity Framework does not map decimal columns that are unsigned. Just uncheck that option and you should be good.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.