Beispiel #1
0
        public static void Initialize(TestContext tc)
        {
            var options = new DbContextOptionsBuilder <Lab1Context>().UseInMemoryDatabase(databaseName: "Lab1TestDb").Options;

            _context = new Lab1Context(options);

            Dealership dealership1 = new Dealership {
                Name = "dealership1", Email = "*****@*****.**"
            };
            Dealership dealership2 = new Dealership {
                Name = "dealership2", Email = "*****@*****.**"
            };

            _context.Dealership.AddRange(dealership1, dealership2);
            _context.SaveChanges();
        }
 public HikesController(Lab1Context context)
 {
     _context = context;
 }
Beispiel #3
0
 public DealershipApiController(Lab1Context context)
 {
     _context = context;
 }
Beispiel #4
0
 public HomeController(ILogger <HomeController> logger, Lab1Context context)
 {
     _logger  = logger;
     _context = context;
 }
Beispiel #5
0
 public SessionController(ILogger <SessionController> logger, Lab1Context context)
 {
     _logger  = logger;
     _context = context;
 }
 public TicketController(ILogger <TicketController> logger, Lab1Context context)
 {
     _logger  = logger;
     _context = context;
 }
Beispiel #7
0
 public FilmController(ILogger <FilmController> logger, Lab1Context context)
 {
     _logger  = logger;
     _context = context;
 }
Beispiel #8
0
 public CarsController(Lab1Context context)
 {
     _context = context;
 }
Beispiel #9
0
 public CharactersController(Lab1Context context)
 {
     _context = context;
 }
Beispiel #10
0
 public MembersController(Lab1Context context)
 {
     _context = context;
 }