更新时间:2023-02-25 21:59:00
AdministratorId为int类型,因此默认值为0.除非数据库中的Administrator记录的AdministratorId为0,否则它将中断您的外键约束.
AdministratorId is type int, so will have a default value of 0. Unless you've got an Administrator record in your database with AdministratorId as 0, this will break your foreign key constraint.
将AdministratorId的类型更改为int吗?应在Application类上解决此问题.
Changing the type of AdministratorId to int? on the Application class should resolve this.