0
I’m trying to model a Client class and the way I did I don’t know if it would be right, because I don’t know how to create the client class that can be both PF and PJ, follows below the modeling of the Person, Personal and Personal.
public abstract class Pessoa
{
public int Id { get; set; }
public TipoPessoa Tipo { get; set; }
}
public enum TipoPessoa
{
Fisica = 1,
Juridica = 2
}
public class PessoaFisica : Pessoa
{
public string Nome { get; set; }
public string CPF { get; set; }
public string RG { get; set; }
public int Idade { get; set; }
}
public class PessoaJuridica : Pessoa
{
public string NomeFantasia { get; set; }
public string RazaoSocial { get; set; }
public string CNPJ { get; set; }
}
How I would create a customer class in this case?