예제 #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);
        }
예제 #2
0
 public static Debit DebitRequestToDebit(DebitRequestModel debitRequest)
 {
     return(AutoMapperFunc.ChangeValues <DebitRequestModel, Debit>(debitRequest));
 }
예제 #3
0
 public static DebitResponseModel DebitToDebitResponse(Debit debit)
 {
     return(AutoMapperFunc.ChangeValues <Debit, DebitResponseModel>(debit));
 }
예제 #4
0
 public static Company CompanyRequestToCompany(CompanyRequestModel companyRequest)
 {
     return(AutoMapperFunc.ChangeValues <CompanyRequestModel, Company>(companyRequest));
 }
예제 #5
0
 public static Invoice InvoiceRequestToInvoice(InvoiceRequestModel invoiceRequest)
 {
     return(AutoMapperFunc.ChangeValues <InvoiceRequestModel, Invoice>(invoiceRequest));
 }
예제 #6
0
 public static InvoiceResponseModel InvoiceToInvoiceResponse(Invoice invoice)
 {
     return(AutoMapperFunc.ChangeValues <Invoice, InvoiceResponseModel>(invoice));
 }