It is possible to set a default value for attribute mapping ? Example, if i have this property :
private string sDoorLength;
[NHibernate.Mapping.Attributes.Property(Column = "door_length")]
public string DoorLeng开发者_JS百科th { get { return sDoorLength; } set { sDoorLength = value; } }
I want to know if it's possible to add a parameter to NHibernate.Mapping.Attributes.Property for setting a default value. Like [NHibernate.Mapping.Attributes.Property(Column = "door_length", Default="Test")]
or something like that.
Thank you !
You could initialize the private field to a default value.
private string sDoorLength = "Test";
精彩评论