Entity Framework Add-Migration adds seed data to migration file each time I execute add-migration

Viewed 52

I have been facing a issue recently, where by there is no change to the model, but when I run add-migration, it generates a file with all the seed data - UpdateData:

migrationBuilder.UpdateData(
            table: "AccountMapping",
            keyColumn: "Id",
            keyValue: 4,
            column: "CreatedDate",
            value: new DateTime(2019, 4, 1, 8, 12, 48, 445, DateTimeKind.Unspecified));

migrationBuilder.UpdateData(
            table: "AccountMapping",
            keyColumn: "Id",
            keyValue: 5,
            column: "CreatedDate",
            value: new DateTime(2019, 4, 1, 8, 12, 48, 445, DateTimeKind.Unspecified));

Though these seed items were part of another migration which I have verified is applied correctly in the database, each time I generate a new migration even without the changes, it brings in seed data, any way to avoid this ??

I don't want my migration to have seed data. Really in need of your assistance

0 Answers
Related