I am working on an application that has the following LINQ Expresion on an EF 6.2.0 context:
context.TimedMessageSendLogs.Include(y => y.TimedMessageCriteria)
What I am not able to find is what is happening in the Include lambda expression and why it is trying to create an foreign key constraint which causes the following exception to be raised:
Exception: Introducing FOREIGN KEY constraint 'FK_dbo.CampaignSearchCriteria_dbo.UserProfile_UpdatedBy' on table 'CampaignSearchCriteria' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints
I have tried adding the constraint as described in the error log but EF ignores it and tries to create one. In digging through the TimedMessageSendLogs
entity I am unable to find anything to do with CampaignSearchCriteria