Beispiel #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);
        }
Beispiel #2
0
 public static Debit DebitRequestToDebit(DebitRequestModel debitRequest)
 {
     return(AutoMapperFunc.ChangeValues <DebitRequestModel, Debit>(debitRequest));
 }
Beispiel #3
0
 public static DebitResponseModel DebitToDebitResponse(Debit debit)
 {
     return(AutoMapperFunc.ChangeValues <Debit, DebitResponseModel>(debit));
 }
Beispiel #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));
 }