示例#1
0
        private static ICollection <VirtualCard> toVirtualCardsEntity(ICollection <VirtualCardDTO> dtos)
        {
            ICollection <VirtualCard> cards = new List <VirtualCard>();

            if (dtos == null)
            {
                return(cards);
            }
            foreach (VirtualCardDTO dto in dtos)
            {
                cards.Add(VirtualCardConverter.ToEntity(dto));
            }

            return(cards);
        }
示例#2
0
        private static ICollection <VirtualCardDTO> toVirtualCardsDTO(ICollection <VirtualCard> entities)
        {
            ICollection <VirtualCardDTO> cards = new List <VirtualCardDTO>();

            if (entities == null)
            {
                return(cards);
            }

            foreach (VirtualCard en in entities)
            {
                cards.Add(VirtualCardConverter.ToDTO(en));
            }

            return(cards);
        }