Ejemplo n.º 1
0
        public MainPage()
        {
            InitializeComponent();
            DataContext db = new BooksDataContext( "isostore:/bookDB.sdf" );

            if (db.DatabaseExists())
                db.DeleteDatabase();
            db.CreateDatabase();

            CreateBook.Click += new RoutedEventHandler( CreateBook_Click );
            ShowData.Click += new RoutedEventHandler( ShowData_Click );
        }
        public MainPage()
        {
            InitializeComponent();
            DataContext db = new BooksDataContext("isostore:/bookDB.sdf");

            if (db.DatabaseExists())
            {
                db.DeleteDatabase();
            }
            db.CreateDatabase();

            CreateBook.Click += new RoutedEventHandler(CreateBook_Click);
            ShowData.Click   += new RoutedEventHandler(ShowData_Click);
        }