Exemplo n.º 1
0
 public MyController(MvcQrCodeContext context,
                     UserManager <ApplicationUser> userManager
                     )
 {
     _context     = context;
     _userManager = userManager;
 }
Exemplo n.º 2
0
 public MyStatisticsController(
     UserManager <ApplicationUser> userManager,
     MvcQrCodeContext context)
 {
     _userManager = userManager;
     _context     = context;
 }
Exemplo n.º 3
0
        public static MvcQrCodeContext Create(string connectionString)
        {
            var optionsBuilder = new DbContextOptionsBuilder <MvcQrCodeContext>();

            optionsBuilder.UseSqlite(connectionString);

            // Ensure that the SQLite database and sechema is created!
            var context = new MvcQrCodeContext(optionsBuilder.Options);

            context.Database.EnsureCreated();

            return(context);
        }
Exemplo n.º 4
0
 public CategoryController(MvcQrCodeContext context)
 {
     _context = context;
 }
Exemplo n.º 5
0
 public QrCodeController(MvcQrCodeContext context)
 {
     _context = context;
 }
Exemplo n.º 6
0
 public DataInitializer(MvcQrCodeContext context)
 {
     _context = context;
 }