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;
        }
Exemple #2
0
        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;
        }
Exemple #3
0
 public OrdersController(GeorgianComputersContext context)
 {
     _context = context;
 }
Exemple #4
0
 public ProductsController(GeorgianComputersContext context)
 {
     _context = context;
 }
 public CategoriesController(GeorgianComputersContext context)
 {
     _context = context;
 }
Exemple #6
0
 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;
 }