示例#1
0
 public async Task Create(WishlistSignature obj)
 {
     if (!obj.IsValid())
     {
         throw new ArgumentException(nameof(obj));
     }
     await _wishlistRepository.Create(obj.Convert());
 }
示例#2
0
 public async virtual Task Add(WishlistItem item)
 {
     await Task.Run(() =>
     {
         IUnitOfWork uow          = this._uowProvider.Get();
         IWishlistRepository repo = this._repoProvider.Get(uow);
         repo.Create(item);
         uow.Dispose();
     });
 }
        public async Task AddEventToWishListAsync(WishlistRequestModel wishlistRequestModel)
        {
            var existingEntity = await _whishlistRepository
                                 .GetWhishlistByUserAndConcertIdAsync(wishlistRequestModel.UserId, wishlistRequestModel.ConcertId);

            if (existingEntity != null)
            {
                return;
            }
            await _whishlistRepository.Create(new Dal.Entities.Wishlist
            {
                ConcertId = wishlistRequestModel.ConcertId,
                UserId    = wishlistRequestModel.UserId
            });
        }
示例#4
0
 public Wishlist Create(Wishlist newWishlist)
 {
     return(_wishlistRepository.Create(newWishlist));
 }