First of all, apologies if I\'m missing some basic stuff here but I\'m new to EF and still getting my head around setting up the DB code first....
I\'m having a
You need to make ActorID
in your UseCase
class as a nullable int. EF is throwing that error because it sees 2 foreign keys that are required in a single class. Having that would create multiple cascade paths--something that SQL Server is, unfortunately, ill-equipped to handle.
In any case, making Actor
optional on your UseCase
class will mean that the Actor
won't be deleted when the UseCase
is, which I believe is your intent.