예제 #1
0
        public void Update(DomainWishList domainWishList)
        {
            var currentWishList = Uow.WishListRepository.Get(domainWishList.Id);

            Mapper.Map <DomainWishList, WishList>(domainWishList, currentWishList);


            Uow.WishListRepository.Update(currentWishList);
            Uow.Commit();
        }
예제 #2
0
        public int Create(DomainWishList domainWishList)
        {
            var wishList = Mapper.Map <WishList>(domainWishList);

            wishList.Friends = wishList.Friends.Select(x => Uow.FriendRepository.Get(x.Id)).ToList();
            Uow.WishListRepository.Insert(wishList);
            Uow.Commit();

            return(wishList.Id);
        }