public CartController(Models.IProductRepository repo, Models.Cart cartService) { repository = repo; cart = cartService; }
public ProductController(Models.IProductRepository productRepository) { this.productRepository = productRepository; }
public ContentController(Models.IProductRepository repository) { this.repository = repository; }
//this is the constructor. //'repo' which is an object of type IProductRepository is passed in as a parameter. //value of instance variable 'respository' object is set here public ProductController(Models.IProductRepository repo) { repository = repo; }
//constructor where an object of my IProductRepository class is passed in and set to the 'repository' instance variable public NavigationMenuViewComponent(Models.IProductRepository repo) { repository = repo; }