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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -