//Constructor where we pass/are injected Repositories by the Dependency Injection System public PastryController(IPastryRepository repositoryofpastriesToSet, IPastryCategoryRepository repositoryofcategoriesToSet, ICommentRepository repositoryofcommentsToSet, AppDbContext appDbContext) { repositoryofpastries = repositoryofpastriesToSet; repositoryofcategories = repositoryofcategoriesToSet; repositoryofcomments = repositoryofcommentsToSet; database = appDbContext; }
public PastryController(IPastryRepository pastryRepository) { PastryRepository = pastryRepository; }
public PastryManagementService(IPastryRepository pastryRepository) { _pastryRepository = pastryRepository; }
//Constructor public HomeController(IPastryRepository pastryRepository) { _pastryRepository = pastryRepository; }
public PastryController(IPastryRepository pastryRepository, ICategoryRepository CategoryRepository) { _pastryRepository = pastryRepository; _categoryRepository = CategoryRepository; }
public ShoppingCartController(IPastryRepository pastryRepository, ShoppingCart shoppingCart) { _pastryRepository = pastryRepository; _shoppingCart = shoppingCart; }