public async Task <int> CategoryUpdateAsync(ICategories category) { if (category != null && category.ProductId != null && string.IsNullOrEmpty(category.Name)) { throw new ArgumentNullException("category"); } return(await categoryRepository.CreateProductAsync(category)); }