I'm sure there's a setting somewhere that I can specify this but I've been pulling my hair out to find it and could use a hint as to where to look in the designer.
Right now the default behavior for class generation is to make nullable value type columns in the database nullable, and non nullable ones non nullable. Unfortunately when this happens it supplies the default values for these nonnullable ones (for instance 0 for an integer.) What I would prefer to have is all of them be nullable and then use the validation logic check to see if the user specified a value (ie pop an error provider for required fields.) It looks like the designer supports this with the (.NET 2.0+) Generate as nullable type option on the columns however this option is grayed out in the designer for the columns in my entities.
Is there a way for me to switch this on globally to automatically make everything nullable to allow for my use case? Essentially I want to let a null pass through the property to the validation (right now it just defaults it back to the default empty value and I don't have a hook to know that the value really is empty.)
I have looked for a global place other than the generation code to set framework version etc. and can't seem to locate it to turn this functionality on. The designer version I'm using shows a version number of 2.5.0.0, since this isn't really a runtime thing I don't imagine that helps.
I guess the second question would be if there is indeed a way to turn this on, what the best methodology to update every column in my project to reflect this nullable state, and how to set it for all new entities.
I'm sure I'm missing something silly here but I figured I'd throw it to the experts .
Thanks in advance,
Scott