Mono InvalidOperationException on DateTime column (SQL Server)

I can't match DateTime2 columns in SQL Server column to DateTime in Mono on OS X.

created_at is defined as indeterminate DateTime2 columns on the sql side and I am defined as public DateTime created_at { get; set; }

on the C # side.

I am getting this exception:

InvalidOperationException: The 'created_at' property on 'revision' could not be set to a 'System.String' value. You must set this property to a non-null value of type 'System.DateTime'.

However, the same definition works when running my project on Windows.

+3


source to share


1 answer


Please try this

public DateTime created_at { get; set; } 

      



this will help you ...

0


source







All Articles