Hi
I am able to assign a default value to an empty dto field using this kind of setup:
objectReturn = New Orm.DerivedModel.DtoClasses.CompanyDto
DirectCast(objectReturn, Orm.DerivedModel.DtoClasses.CompanyDto).Enabled = True
I couldn't see a way to setup the default in the derived model setup or the entity setup screens. I have also seen the comments that the database is relied on to insert a default instead of a null value for a field.
My situation is that I use the dto to define the structure in the page and certain fields such as the enabled checkbox (above) would be best ticked by default.
Ideally I would set this up in the entity or DTO model rather than my own code (although it is nice to have the option to do it in code). Am I missing where it can be done in the model or should I just carry on using the code based approach as shown?
Regards
Jon