0

I have an error when updating my database that is running the seed method.

This is my model Client:

   public int ClientID
    {
        get;
        set;
    }
    [Required]
    public string portfolio
    {
        get;
        set;
    }
    public int ProfilID
    {
        get;
        set;
    }
    public int RestrictionID
    {
        get;
        set;
    }
   public virtual Profil Profil
    {
        get;
        set;
    }
    public virtual Restriction Restriction
    {
        get;
        set;
    }

Restriction:

 public int RestrictionID
    {
        get;
        set;
    }
    public string Restriction_name
    {
        get;
        set;
    }
   public int ProfilID
    {
        get;
        set;
    }
    public int RestrictionTypeID
    {
        get;
        set;
    }
    public virtual Profil Profil
    {
        get;
        set;
    }
    public virtual RestrictionType RestrictionType
    {
        get;
        set;
    }

Restriction_type { RestrictionTypeID, label}

then here is Profil{ ProfilID, Profil_name}

I don't know if the problem is because of the navigation properties ? I don't know what is happening here is my error message in the console:

Introducing FOREIGN KEY constraint 'FK_dbo.Restriction_dbo.Profil_ProfilID' on table 'Restriction' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.

Thank you in advance for your help!

Carlos Muñoz
  • 17,397
  • 7
  • 55
  • 80
nabs
  • 51
  • 1
  • 6
  • Yes it is entity framework – nabs Aug 11 '14 at 14:26
  • possible duplicate of [Entity Framework: how to solve "FOREIGN KEY constraint may cause cycles or multiple cascade paths"?](http://stackoverflow.com/questions/14489676/entity-framework-how-to-solve-foreign-key-constraint-may-cause-cycles-or-multi) – Carlos Muñoz Aug 11 '14 at 15:11
  • Here is another one: http://stackoverflow.com/questions/17127351/introducing-foreign-key-constraint-may-cause-cycles-or-multiple-cascade-paths – Carlos Muñoz Aug 11 '14 at 15:13

0 Answers0