public ShopController(GeorgianComputersContext context, IConfiguration configuration) // dependency injection { //accept an intance of our DB connection class and use this object connection _context = context; //accept an intance of the configuration object se we can read appsettings.json _configuration = configuration; }
public ShopController(GeorgianComputersContext context, IConfiguration configuration) // Dependenacy Injection { //accept an instance of our DB connection class and use this object connection, underscore means an object that is being injected, similar to this. _context = context; // accept an instance of the configuration object so we can read appsetting.json _configuration = configuration; }
public OrdersController(GeorgianComputersContext context) { _context = context; }
public ProductsController(GeorgianComputersContext context) { _context = context; }
public CategoriesController(GeorgianComputersContext context) { _context = context; }
public ShopController(GeorgianComputersContext context, IConfiguration configuration) { // instance of DBconnection class _context = context; _configuration = configuration; //Access to the API keys }
public ShopController(GeorgianComputersContext context, IConfiguration configuration) { _context = context; _configuration = configuration; }
public ApplicationRolesController(GeorgianComputersContext context) { _context = context; }