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.

Fixed 🙂

§ 9 Responses to Facing problem accessing MySql Timestamp column in Entity Framework

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

What’s this?

You are currently reading Facing problem accessing MySql Timestamp column in Entity Framework at Naik Vinay.

meta

%d bloggers like this: