Fix to Entity Framework Migration Error : Failed executing DbCommand ON DELETE CASCADE;

Опубликовано: 18 Октябрь 2024
на канале: Evan Gudmestad
136
3

In this video I show a fix for a common EF Migration error message.
The full error message is as follows:
Failed executing DbCommand (25ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] ALTER TABLE [Contacts] ADD CONSTRAINT [FK_Contacts_Categories_CategoryId] FOREIGN KEY ([CategoryId]) REFERENCES [Categories] ([CategoryId]) ON DELETE CASCADE;