Example #1
0
        public async Task AddStock(int recordId, int quantity)
        {
            await _validator.RecordExists(recordId);

            await _db.Stocks.Add(recordId, quantity);

            await _db.SaveChanges();
        }
Example #2
0
        public async Task AddToWishlist(int recordId)
        {
            await _validator.RecordExists(recordId);

            await _validator.RecordIsNotInWishlist(recordId);

            await AddRecordToWishlist(recordId);
        }
Example #3
0
        public virtual async Task Add(int itemId)
        {
            await _validator.RecordExists(itemId);

            await _validator.ItemIsInStock(itemId, Items);

            await AddItemToShoppingCart(itemId);
        }