Пример #1
0
        public async Task <bool> UpdateProductAsync(ProductInputDto dto)
        {
            var product = dto.MapTo <Product>();

            return(await _productRepo.UpdateAsync(product) > 0);
        }
Пример #2
0
        public async Task <bool> AddProductAsync(ProductInputDto dto)
        {
            var product = dto.MapTo <Product>();

            return(await _productRepo.InsertAsync(product) > 0);
        }