MySql의 datetime 필드가 "0000-00-00 00:00:00"과 같을 때, NHibernate는 그것을 .net datetime으로 변환 할 수 없습니다.Fluent Nhibernate mysql 날짜 문제
ERRORMESSAGE :
"Unable to convert MySQL date/time value to System.DateTime"
어떻게 유창함 자 NHibernate가 null 또는 datetime.min 하나에 값을 캐스팅 구성 할 수 있습니다?
편집 : 나는이 시도했다
: NHibernate Unable to convert MySQL date/time value to System.DateTime 가 있지만 작동하지 않습니다. 가 여기 내 구성입니다 : 내가 언급
string connectionString = "Server=SERVER;Port=3306;Database=DB;Uid=USER;Pwd=PASSWORD; Allow Zero Datetime=true;";
return Fluently.Configure()
.Database(MySQLConfiguration
.Standard
.ConnectionString(connectionString)
)
.Mappings(m =>
m.FluentMappings
.AddFromAssemblyOf<MyMapping>()
)
.BuildSessionFactory()
;
http://stackoverflow.com/questions/4626820/nhibernate-unable-to-convert-mysql-date-time-value-to-system-datetime –
나는 이것을 시도했지만 성공하지는 못했다. – eflles