Mysql with Linq 2 Entities

I want to recieve all rows from a mysql table and got problems immedietly when adding a "created" field to the model. The created-field is a TIMESTAMP in mysql and appears to be a DateTimeOffset in the model. This give me bug-like-problem when reading the data. How am I possible to cast this field to a string or something?

Who is Participating?
AshokConnect With a Mentor Commented:
public static string TimestampToString(this System.Data.Linq.Binary binary)  
  byte[] binarybytes = binary.ToArray();  
  string result = "";  
  foreach (byte b in binarybytes)  
    result += b.ToString() + "|";  
  result = result.Substring(0, result.Length - 1);
  return result;  

>>>>> There is one more >>>>  public static System.Data.Linq.Binary StringToTimestamp(this string s)

Read complete articel @

dingirAuthor Commented:
Wow that was a hack..

However i seemed to fix it just by adjust connection string.. i will check it today and leave a  feedback
dingirAuthor Commented:
Not really a solution but maybe it help someone else,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.