// constructor - method use to create an instance of this class public ShopController(BobaShopContext _context, IConfiguration _configuration) { // accept in an instance of our db connection class and use this object to connect this._context = _context; this._configuration = _configuration; }
public CategoriesController(BobaShopContext context) { _context = context; }
public ProductsController(BobaShopContext context, IHostingEnvironment hostingEnvironment) { _context = context; _hostingEnvironment = hostingEnvironment; }
public OrdersController(BobaShopContext context) { _context = context; }