コード例 #1
0
        void ClearDatabase()
        {
            IEnumerable <Flight> flightEntities = Flights.ToList();

            if (flightEntities.Count() > 0)
            {
                Flights.RemoveRange(flightEntities);
                SaveChanges();
            }
        }