public async Task RemoveImage(string name) { var productImage = await _productImageRepository.GetProductImageByName(name); await _productImageRepository.DeleteAsync(productImage); }
public async Task DeleteProductImageAsync(ProductImage productImage) { await _productImageRepository.DeleteAsync(productImage); await _dbContext.SaveChangesAsync(); }