public static void SeedDB(VehiclesPriceListAppContext context)
        {
            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();

            GlobalSeeder seeder = new GlobalSeeder();

            seeder.SeedDatabase(context);
        }
Exemple #2
0
 public UnitOfWork(VehiclesPriceListAppContext context)
 {
     _context              = context;
     VehiclesPriceList     = new VehiclesPriceListRepository(_context);
     Menufacturers         = new MenufacturersRepository(_context);
     MenufactureringOrigin = new MenufactureringOriginRepository(_context);
     VehicleOwners         = new OwnersRepository(_context);
     VehicleStatus         = new StatusRepository(_context);
     VehicleType           = new TypeRepository(_context);
 }