Exemplo n.º 1
0
 public ListOfPayments GetPayments()
 {
     return(string.IsNullOrEmpty(this.Payments) ? ListOfPayments.Create() : (ListOfPayments)this.Payments);
 }
Exemplo n.º 2
0
        public IEnumerable <PaymentViewModel> Resolve(
            Paycheck source,
            PaycheckViewModel destination,
            IEnumerable <PaymentViewModel> destMember,
            ResolutionContext context)
        {
            var payments = !string.IsNullOrEmpty(source.Payments) ? (ListOfPayments)source.Payments : ListOfPayments.Create();

            return(context.Mapper.Map <IEnumerable <Payment>, IEnumerable <PaymentViewModel> >(payments));
        }