public async Task <bool> DeleteProductAsync(int CategoryId, int id) { await ValidateCategory(CategoryId); await EcomakRepository.DeleteProductAsync(id); if (await EcomakRepository.SaveChangesAsync()) { return(true); } return(false); }