Exemple #1
0
        public static CompanyResponseModel CompanyToCompanyResponse(Company company)
        {
            var companyModel = AutoMapperFunc.ChangeValues <Company, CompanyResponseModel>(company);

            var debits = company.Debits?.Select(x => DebitMap.DebitToDebitResponse(x)).ToList();

            companyModel.SetDebits(debits);

            var invoices = company.Invoices?.Select(x => InvoiceMap.InvoiceToInvoiceResponse(x)).ToList();

            companyModel.SetInvoices(invoices);

            return(companyModel);
        }
 public static Debit DebitRequestToDebit(DebitRequestModel debitRequest)
 {
     return(AutoMapperFunc.ChangeValues <DebitRequestModel, Debit>(debitRequest));
 }
 public static DebitResponseModel DebitToDebitResponse(Debit debit)
 {
     return(AutoMapperFunc.ChangeValues <Debit, DebitResponseModel>(debit));
 }
Exemple #4
0
 public static Company CompanyRequestToCompany(CompanyRequestModel companyRequest)
 {
     return(AutoMapperFunc.ChangeValues <CompanyRequestModel, Company>(companyRequest));
 }
 public static Invoice InvoiceRequestToInvoice(InvoiceRequestModel invoiceRequest)
 {
     return(AutoMapperFunc.ChangeValues <InvoiceRequestModel, Invoice>(invoiceRequest));
 }
 public static InvoiceResponseModel InvoiceToInvoiceResponse(Invoice invoice)
 {
     return(AutoMapperFunc.ChangeValues <Invoice, InvoiceResponseModel>(invoice));
 }