외래 키를 기본 키로 사용할 수 있습니까? 그렇다면 누군가 내 코드를 도울 수 있습니까? 내가 하나 (또는 없음) 과제 당 기록을 가지고 테이블을 만들려고 해요ASP.NET MVC - 기본 키로 외래 키?
One or more validation errors were detected during model generation:
System.Data.Edm.EdmAssociationEnd: : Multiplicity is not valid in Role 'AssignmentLocks_Assignment_Source' in relationship 'AssignmentLocks_Assignment'. Because the Dependent Role refers to the key properties, the upper bound of the multiplicity of the Dependent Role must be �1�.
: 나는 위의 코드에 대한
<Key()>
Public Property AssignmentID() As Integer
<ForeignKey("AssignmentID")>
Public Overridable Property Assignment As Assignment
Public Overridable Property User As User
오류가 발생합니다.
이것은 MVC와는 아무런 관련이 없습니다. –