I have a table with a column [CreatedAtIsoUtc] that sets a Sql Server default value
migrationBuilder.CreateTable(
name: "CurrentAccountLedger",
columns: table => new
{
Id = table.Column<Guid>(nullable: false, defaultValueSql: "newsequentialid()"),
CreatedAtIsoUtc = table.Column<DateTime>(nullable: false, defaultValueSql: "GETUTCDATE()"),
}
});
In a raw sql server query, I can insert a record and overwrite the [CreatedAtIsoUtc] default value.
In Entity Framework, I can't seem to overwrite this value when performing an Add() operation.
Any ideas on how I could get this working?