how i pledge linq sql doesn't overrule violate non-nullable db default values?


i have an sql server db list fields:




  1. a bit default value 1, not null.

  2. a smalldatetime default value gettime(), not null.

  3. an int default value, identity, not null.



when i beget linq sql table, following happens:




  1. the bit given special treatment.

  2. the smalldatetime given special treatment.

  3. the int noted isdbgenerated.



this means i inserts controlling linq sql, following happen:




  1. the bit sent 0, vital default value. right?

  2. the smalldatetime sent an uninitialized system.datetime, producing an blunder sql server given doesn't tumble sql server smalldatetime range. right?

  3. the isdbgenerated int sent; db beget value linq sql following review back.



what changes i have to unfolding work?



to summarize: i wish non-nullable fields db-assigned default values, nonetheless i don't wish isdbgenerated means i can't yield values origination updates inserts controlling linq sql. i also wish isdbgenerated means i have hand-modify formula generated linq sql.



edit: answer seems discount tide linq sql.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?