Beispiel #1
0
 public CategoryController(CategoryRepository categoryRepository)
 {
     _categoryRepository = categoryRepository;
 }
Beispiel #2
0
 private static void ShowCategoriesInDB(CategoryRepository repository)
 {
     var categories = repository.FindAll();
     var count = 0;
     foreach (var entity in categories)
     {
         var category = entity as Category;
         LogCategory(category);
         count++;
     }
     Console.WriteLine("");
     Console.WriteLine(string.Format("Total Categories in DATABASE: {0}", count));
     Console.WriteLine("");
 }
Beispiel #3
0
 public ProductController(ProductRepository productRepository, CategoryRepository categoryRepository, ImageRepository imageRepository)
 {
     _productRepository = productRepository;
     _categoryRepository = categoryRepository;
     _imageRepository = imageRepository;
 }