public static InMemoryRepository<Category> GetCategoriesRepository(int numberOfCategories = 10)
        {
            var repo = new InMemoryRepository<Category>();

            for (var i = 0; i < numberOfCategories; i++)
            {
                var category = new Category
                {
                    Id = i + 1,
                    Name = "TestCategory" + i
                };

                repo.Add(category);
            }

            return repo;
        }
 public void Update(Category category)
 {
     this.categories.Update(category);
     this.categories.SaveChanges();
 }
 public void Delete(Category category)
 {
     this.categories.Delete(category);
     this.categories.SaveChanges();
 }