i have a question about the default min value of a date in mysql and entity framework.
I have a a web application that uses entity framework 4.1 and the mysql connector 6.3.6 and in my mysql table i have columns that the need to initialize in the min datettime value of mysql that is ‘0000-00-00’, but from the .NET side, i cant insert that value because the min value of .NET is ‘0001-01-01’ and that gives me many problems. I cant change that the mysql column allow the ‘0001-01-01’ because the mysql table is used in another projects that use that date as a reference, so if i change this for my project, then all the projects will need to update their code and thats is a thing that i dont want to.
So, do i have a solution for this? How can i insert a min mysql value (‘0000-00-00’) from .NET using entity framework?
Thanks!
You can set default value in MYSQL with your desired format, and pass null value with EF.
Hope isn’t mandatory fields 😉