c# - How to tell entity framework not to update a field? -
i using mysql .net connector , when insert record database, takes .net datetime , complains can't convert .net datetime mysql datetime. there way can have entity framework not update field?
do remove entity model or there property can set on it?
i have tried convert 0 datetime=true
& allow 0 datetime=true
in connection string, inserts 0000-00-00 00:00:00:00
when insert.
i have tried explicitly setting datetime
via convert.todatetime(updatedt.tostring("yyyy-mm-dd hh:mm:ss"));
, not work , don't want have explicitly set datetime every object has datetime
field. want database take care of setting date me on inserts or updates.
Comments
Post a Comment