1
I would like to know how I perform the modeling of a given entity, where its reference value belongs to another table. This benchmark would be a domain table that has your credit card id s, because my user will be able to register that your service accepts several credit card flags like Visa, Master, etc.
Below is an example of my entities:
public class CartaoCreditoUsuario
{
public string Id { get; set; }
public int CartaoCreditoId { get; set; }
public virtual Usuario.Usuario Usuario { get; set; }
}
public class Usuario
{
public Usuario()
{
Id = Guid.NewGuid().ToString();
Enderecos = new List<Endereco>();
}
public string Id { get; set; }
public virtual string Email { get; set; }
public virtual bool ConfirmaçãoEmail{ get; set; }
public virtual ICollection<CartaoCreditoUsuario> CartaoCreditoUsuario { get; set; }
....
}
public class CartaoCredito
{
public int CartaoCreditoId { get; set; }
public string DescricaoCartaoCredito { get; set; }
}
I wish I knew how it would look mine modelBuilder.Configurations
referring to the entities cited above.
Thank you in advance.