Esempio n. 1
0
        public async Task <bool> Update(Product product)
        {
            Product productItem = await GetById(product.ProductId);

            if (productItem != null)
            {
                productItem.Name = product.Name;
            }
            else
            {
                _dbContext.Add(product);
            }

            return(true);
        }