Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

TIMESTAMP mapping (no replies)

$
0
0
I create table

CREATE TABLE `Account` (
`id` int(10) unsigned NOT NULL auto_increment,
`nickName` varchar(45) NOT NULL,
...
`created` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8$$

Map the ADO.net Entity to this table.

I have a problem with generated field time-stamp, it has mapped to the property of DataTimeOffset type, model validation went ok, but when I insert data to the table I get an exception "could not cast DataTime to DataTimeOffset".

In case I set the property type to DataTime, model is not valid, and I can't request any data from this table.

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>