I have a field in my model class like below:
[ScaffoldColumn(false)]
public DateTime DatePosted { get; set; }
I would like that this field be set to DateTime.Now by default, unless a value was given. In MSSQL server this can be achieved in the table design view by setting the date field's property "Default Value or Binding" to getdate() - I think, please correct me if I'm wrong.