public async Task RemoveItem(int CompareId, int productId)
        {
            var spec    = new CompareWithItemsSpecification(CompareId);
            var compare = (await _compareRepository.GetAsync(spec)).FirstOrDefault();

            compare.RemoveItem(productId);
            await _compareRepository.UpdateAsync(compare);
        }
Exemple #2
0
        public async Task <Compare> GetByUserNameAsync(string userName)
        {
            var spec = new CompareWithItemsSpecification(userName);

            return((await GetAsync(spec)).FirstOrDefault());
        }