MySQL timestamp to .NET timestamp

842 Views Asked by At

I am using DBLinq to access a MySQL DB from C# .NET 3.5

I have created the dbml file for the Visual Studio 2010 ORM, and it loads fine - however when I compile the source I am met with errors regarding the conversion of MySQL timestamp to .NET DateTime.

Now this kind of makes sense, because they are 2 'different' types (Though the MySQL documentation says that they are practically the same).http://dev.mysql.com/doc/refman/5.0/en/datetime.html

The error thrown by VS 2010 is:

Error 1 DBML1005: Mapping between DbType 'timestamp' and Type 'System.DateTime' in Column 'RowVersion' of Type 'Activity' is not supported. 0 0

Where RowVersion is a timestamp for optimistic concurrency.

How do I get it to work between the 2?

2

There are 2 best solutions below

0
On BEST ANSWER

Turns out this is a problem with DBLINQ, problem reported to Mono DBLINQ team.

0
On

You can try to use Devart dorConnect for MySQL or Devart LinqConnect while problem is fixing by Mono DBLINQ team. These products should work with Mono Framework