Facing problem accessing MySql Timestamp column in Entity Framework
August 2, 2012 § 9 Comments
Another issue face today with Entity Framework using MySql
I am using MySql .net connector 6.3.6 and Visual Studio 2010. One of the table in the database has a timestamp column. When I generate Entity mappings (.edmx file), the timestamp column is getting mapped to DateTimeOffset data type. And when I hit a Linq query on this table, I always get Null value for this column (this column is nullable) even though there are valid non-null values in the table for this column. If I try to update the mapping to a datetime datatype, visual studio throws error.
So I manually had to change in .edmx opening in notepad and it work with out any problem. I Set the type of the CSDL property to DateTime, and I also set the type of the SSDL property to “datetime” as well.