main
1using gorilla.commons.utility;
2using MoMoney.Domain.Accounting;
3using MoMoney.DTO;
4
5namespace MoMoney.boot.container.registration.mapping
6{
7 public class Mappers
8 {
9 static public Mapper<IBill, BillInformationDTO> bill_mapper =
10 new Map<IBill, BillInformationDTO>()
11 .initialize_mapping_using(() => new BillInformationDTO())
12 .map(x => x.company_to_pay.name, y => y.company_name)
13 .map(x => x.the_amount_owed.ToString(), y => y.the_amount_owed)
14 .map(x => x.due_date.to_date_time(), y => y.due_date);
15 }
16}