I'm going back to EF (Code First) and ATM trying to set up a 1-1 relationship using DataAnnotations.
public class CmsMember
{
[Key]
public int nodeId { get; set; }
public string Email { get; set; }
public string LoginName { get; set; }
public string Password { get; set; }
public Client Client { get; set; }
}
public class Client
{
[ForeignKey("CmsMember")]
public int nodeId { get; set; }
public int ClientId { get; set; }
public string ClientName { get; set; }
public CmsMember CmsMember { get; set; }
}
I'm stuck on error (on add-migration command) saying:
** \tSystem.Data.Entity.Edm.EdmAssociationEnd: : Multiplicity is not valid in Role 'Client_CmsMember_Source' in relationship 'Client_CmsMember'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be ''. *
Any hint would be highly appreciated.