asp.net MVC 应用程序中的更新数据库问题

Update-database problem in asp.net MVC application

当我在包管理器控制台中更新数据库时出现此错误

在 table 'Appointments' 上引入 FOREIGN KEY 约束 'FK_dbo.Appointments_dbo.Users_AppointmentManagerId' 可能会导致循环或多个级联路径。指定 ON DELETE NO ACTION 或 ON UPDATE NO ACTION,或修改其他 FOREIGN KEY 约束。 无法创建约束或索引。查看以前的错误。

我的类

   [Table("Appointments")]
    public class Appointment
    {
        #region property 

            [Key]
            public int Id { get; set; }
            [Required]
            [MaxLength(200)]
            public string Subject { get; set; }
            [Required]
            [MaxLength(500)]
            public string Description { get; set; }
            [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy hh:mm tt")]
            public DateTime StarTime { get; set; }
            [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy hh:mm tt")]
            public DateTime EndTime { get; set; }
            public String Location { get; set; }

        #endregion
        #region relationship

            [ForeignKey("AppointmentCustomer")]
            public int AppointmentCustomerId { get; set; }
            [ForeignKey("AppointmentManager")]
            public int AppointmentManagerId { get; set; }
            public virtual Users AppointmentCustomer { get; set; }
            public virtual Users AppointmentManager { get; set; }

        #endregion
    }



 [Table("Users")]
    public class Users
    {
        #region property 

            [Key]
            public int Id { get; set; }
            [Required]
            public string IDUser { get; set; }
            [Required]
            public string Email { get; set; }

        #endregion
        #region relationship

            [InverseProperty("TicketDeveloper")]
            public virtual ICollection<Ticket> TicketDevelopers { get; set; }  
            [InverseProperty("TicketTester")]
            public virtual ICollection<Ticket> TicketTesters { get; set; }
            [InverseProperty("ProjectCustomer")]
            public virtual ICollection<Project> ProjectCustomers { get; set; }
            [InverseProperty("ProjectManager")]
            public virtual ICollection<Project> ProjectManagers { get; set; }
            [InverseProperty("NoteTester")]
            public virtual ICollection<Note> NoteTesters { get; set; }
            [InverseProperty("CaseCustomer")]
            public virtual ICollection<Case> CaseCustomers { get; set; }
            [InverseProperty("AppointmentCustomer")]
            public virtual ICollection<Appointment> AppointmentCustomers { get; set; }
            [InverseProperty("AppointmentManager")]
            public virtual ICollection<Appointment> AppointmentManagers { get; set; }

        #endregion
}

好的我解决问题了 int? 在外键中

        [ForeignKey("AppointmentCustomer")]
        public int? AppointmentCustomerId { get; set; }
        [ForeignKey("AppointmentManager")]
        public int? AppointmentManagerId { get; set; }
        public virtual Users AppointmentCustomer { get; set; }
        public virtual Users AppointmentManager { get; set; }