MVC 5 + EF 6 + MySQL Connector/NET 6.9.6 and TIMESTAMP
Hi guys,
I have a mySql db build by someone. A table has a colum defined as nullable timestamp.
I map it to my entity as
[Column(TypeName = "timestamp")]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public DateTime? MYCOL{ get; set; }
and Migrations translate this in
AlterColumn("dbo.locusrchkin", "MYCOL", c => c.DateTime(precision: 0, storeType: "timestamp"));
Running Update-Database I receive the error "Invalid default value for 'MYCOL'" because it runs
alter table `MYTABLE` modify `MYCOL` timestamp
How con I map a nullable timestamp in my POCO entity ??? It drive me crazy!
TY.
Subject
Written By
Posted
MVC 5 + EF 6 + MySQL Connector/NET 6.9.6 and TIMESTAMP
June 26, 2015 09:52AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.