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; }
public void Update(DomainWishList domainWishList) { var currentWishList = Uow.WishListRepository.Get(domainWishList.Id); Mapper.Map<DomainWishList, WishList>(domainWishList, currentWishList); Uow.WishListRepository.Update(currentWishList); Uow.Commit(); }