Beispiel #1
0
        public ParentChildCardDTO AddParentIntoChildCard(ParentChildCardDTO parentChildCardDTO)
        {
            var parentChildCard = ChildCardDTOHelper.DTOToEntity(parentChildCardDTO);

            _unitOfWork.ParentChildCardRepository.Add(parentChildCard);
            _unitOfWork.Save();

            return(parentChildCardDTO);
        }
 public static AddParentChildCardVM DTOToVM(ParentChildCardDTO parentVM)
 {
     Mapper.Initialize(cfg => cfg.CreateMap <AddParentChildCardVM, AddParentChildCardVM>());
     return(Mapper.Map <AddParentChildCardVM>(parentVM));
 }
Beispiel #3
0
 public static ParentChildCard DTOToEntity(ParentChildCardDTO parentChildCardDTO)
 {
     Mapper.Initialize(cfg => cfg.CreateMap <ParentChildCardDTO, ParentChildCard>());
     return(Mapper.Map <ParentChildCard>(parentChildCardDTO));
 }