I'm having trouble updating a record, using ef. The key conflict error with relationship. Like I've been trying to add and not upgrade.
Additional information: A referential integrity constraint violation occurred: The property value (s) of 'Endereco.EnderecoId' on one end of a relationship do not match the property value (s) of 'Client.EnderecoId' on the other end .
public class Cliente
{
public Int64 ClienteId { get; set; }
public String Nome { get; set; }
public String Email { get; set; }
public String Cpf { get; set; }
public String Rg { get; set; }
public String TelFixo { get; set; }
public String Celular { get; set; }
public Int64 EnderecoId { get; set; }
public virtual Endereco Endereco { get; set; }
}
public class Endereco
{
public Int64 EnderecoId { get; set; }
public Int64 CidadeId { get; set; }
public Int64 EstadoId { get; set; }
public String Rua { get; set; }
public String Complemento { get; set; }
public String CEP { get; set; }
public String Bairro { get; set; }
public String Numero { get; set; }
public virtual Cidade Cidade { get; set; }
public virtual Estado Estado { get; set; }
public virtual ICollection<Cliente> ClienteList { get; set; }
}