If I have a Customers entity
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
to ClienteId
, it understands that this is the relation with the Client, but how to do with DataAnnotation
so that there is the relationship with the Client?
in the 1-to-1 case
NOTE: I know that I should standardize names, not to turn a salad of names, but in one place I wanted to use another name and then the problem happened.