コード例 #1
0
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            int countSize = 1000;

            modelBuilder.Entity <Position>().HasData(InitDb.GetPositions(countSize));
            modelBuilder.Entity <Staff>().HasData(InitDb.GetStaffs(countSize));

            modelBuilder.Entity <TypeAirplane>().HasData(InitDb.GetTypeAirplanes(countSize));
            modelBuilder.Entity <Airplane>().HasData(InitDb.GetAirplanes(countSize));

            modelBuilder.Entity <JobAirplane>().HasData(InitDb.GetJobAirplanes(countSize));

            modelBuilder.Entity <Flight>().HasData(InitDb.GetFlights(countSize));
            modelBuilder.Entity <Ticket>().HasData(InitDb.GetTickets(countSize));
        }