Beispiel #1
0
        /// <summary>
        /// Method to set Seeds into CompanyAirportsSet-Table.
        /// </summary>
        /// <param name="db">DB context.</param>
        public static void SetSeeds(SSOContext db)
        {
            List <CompanyAirports> seedList = new List <CompanyAirports>
            {
                new CompanyAirports {
                    CompanyId = GetId.CompanyID("PROFI-IT", db), AirportId = 1
                },
                new CompanyAirports {
                    CompanyId = GetId.CompanyID("ODS", db), AirportId = 1
                }
            };

            db.AddRange(seedList);
            db.SaveChanges();
        }