Specify ON DELETE NO ACTION in ASP.NET MVC 4 C# Code First

后端 未结 5 529
情歌与酒
情歌与酒 2021-01-01 09:57

How do I specify ON DELETE NO ACTION Foreign Key Constraint in my model designs?

At present, I have:

public class Status
{
    [Required]
    public          


        
5条回答
  •  春和景丽
    2021-01-01 11:01

    After making the changes to the model, make sure you regenerate the migration file by adding the -Force parameter.

    Add-Migration MigrationName -Force

提交回复
热议问题