Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Candidate
- {
- public int PCountryId { get; set; }
- public Country PCountry { get; set; }
- public int NCountryId { get; set; }
- public Country NCountry { get; set; }
- }
- Introducing FOREIGN KEY constraint 'FK_tblDetails_tblCountries_NCountryId' on table 'tblDetails' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
- Could not create constraint
- public int? NCountryId { get; set; }
- foreach (var relationship in modelBuilder.Model.GetEntityTypes().SelectMany(e => e.GetForeignKeys()))
- {
- relationship.DeleteBehavior = DeleteBehavior.Restrict;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement