public async Task Create(WishlistSignature obj) { if (!obj.IsValid()) { throw new ArgumentException(nameof(obj)); } await _wishlistRepository.Create(obj.Convert()); }
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 }); }
public Wishlist Create(Wishlist newWishlist) { return(_wishlistRepository.Create(newWishlist)); }