I am creating tables using code first and I have column called CreatedDate, I want this column to have a default value of GETDATE().
But I don't want to do this is in the migration script like below
AddColumn("Agents", "CreatedDate", n => n.DateTime(nullable: false, defaultValueSql: "GETDATE()"));
How can I do this in the Mapping or in the model class?