c# - Auto Generated value linqtosql- not updating -


got sql server column

   datetime, not-null, defaults getdate() 

in linq-to-sql (.dbml) model.

for property in table

    autogenerated value true     , auto-sync: oninsert() 

on insert in c#, default value (current date) automatically inserted in table(c# no values passed)

while updating, if update value current date doesn't update.

however if change

    autogenerated value false     , auto-sync: never 

update works (but need pass value through c#)but insert fails sql server overflow error because no values passed clientside c# sql server

is there easy way update column value default value?

the solution know keep property

    autogenerated value false     , auto-sync: never 

and pass current date sql server on insert? i'm using many default values in sql server. don't want pass default values on insert server side.

what want achieve send no values on inserting, sql job(default value updating) , if pass different value in update via c# should update database(which not working @ moment)? if didn't understand question, please let me know?

please check comments if didn't understand question?


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -