1
I have a class constructor method that when called makes a query in another database class that returns me the same constructor method class(only with the assigned data), example:
public Invoice(int id)
{
   CallDB db = new CallDB();
   Invoice invoice = db.ReturnInvoice(id);
   this.Filial = invoice.Filial;
   this.UserProfileModel = invoice.UserProfileModel;
   this.DataEmissao = invoice.DataEmissao;
   this.DataVencimento = invoice.DataVencimento;
   this.ID = invoice.ID;
}
I wouldn’t want to be using the this "300 thousand" times, it would be possible to do something like this?
public Invoice(int id)
{
   CallDB db = new CallDB();
   Invoice invoice = db.ReturnInvoice(id);
   this.Invoice = invoice ; //estou atribuindo a classe como um todo ao invés de cada atributo separadamente
}
As the other colleague said, the organization is wrong right... I will give a studied in their quoted answers (which by the way are always FODAS) and I will apply the correct, thank you.
– Leonardo Bonetti