JasinCole
Well-known member
- Joined
- Feb 16, 2023
- Messages
- 66
- Programming Experience
- 1-3
What's the harm in marking my table column in EF core as an int if the sql server type is bigint which is actually a long in C#?
As you are probably aware by now, I am working on a database that I did not design. But I do not understand the need of the database designers to use bigint for the column when the maximum value can only be 99999. Makes no sense, but I can not change it. I do recognize that this column is similar to a couple hundred more tables with the same column where the number can be much larger than 99999.
I haven't tried to even see if EF Core will allow me to change it to int without throwing a fit. Does EF Core have any sort of automatic conversion from C# types to Sql Server types when types do not match?
As you are probably aware by now, I am working on a database that I did not design. But I do not understand the need of the database designers to use bigint for the column when the maximum value can only be 99999. Makes no sense, but I can not change it. I do recognize that this column is similar to a couple hundred more tables with the same column where the number can be much larger than 99999.
I haven't tried to even see if EF Core will allow me to change it to int without throwing a fit. Does EF Core have any sort of automatic conversion from C# types to Sql Server types when types do not match?