1
I have two tables Contact(Man) and Woman. A man can have several women and a woman is for a man.
public class Contato {
public int id { get; set; }
public String usuario { get; set; }
public String nome { get; set; }
public String senha { get; set; }
public List<Mulher> listaMulher { get; set; }
}
public class Mulher
{
public int idM { get; set; }
public Contato id { get; set; }
public String nome { get; set; }
public String formacao { get; set; }
}
Would that be the way? But what about the woman how can I add a key to the woman? How would that look in the main class?
Just to confirm, you’re using EF, right?
– Genos
What is an EF??????????
– Aline
Entity Framework. If you’re not using it, you have to tell us what technology you intend to use.
– Genos
I am not using and do not intend to use. Here at the moment I am only doing everything on hand same...
– Aline
If you’re making one framework BD access yam It is up to you to define the API. Otherwise you will have to choose a framework existing. Then it depends on you to decide what best to watch out for, there are various options, EF, Nhibernate, Dapper, etc. Search and then add details to the question.
– Genos