Exemplo n.º 1
0
 private static void RecreateDatabase()
 {
     using (var context = new SpaceShipContext())
     {
         context.Database.EnsureDeleted();
         context.Database.EnsureCreated();
     }
 }
Exemplo n.º 2
0
        private static List <Spaceships> GetAllSpaceships()
        {
            var _context = new SpaceShipContext();

            return(_context.Spaceships.Include(x => x.Name).ToList());
        }