1
If I have an entity Customers
public class Cliente
{
public int ClienteId { get; set; }
public string Email { get; set; }
public string Nome { get; set; }
}
If I create a Boleto entity
public class Boleto
{
public int BoletoId { get; set; }
public string Email { get; set; }
public int IDC { get; set; }
public virtual Cliente Cliente { get; set; }
}
If I change the IDC for ClienteId, he understands that this is the relationship with the Client, but how to do with DataAnnotation so that there is the relationship with the Client?
in case 1-to-1
NOTE: I know I should standardize the names, not to become a salad of names, but in one place I wanted to use another name and then the problem happened.
specify on public virtual client client? show. .entendi.. thank you
– Dorathoto