Example #1
0
        private SqlCeDataStore Initialize()
        {
            var store = new SqlCeDataStore("pubs.sdf");

            if (store.StoreExists)
            {
                store.DeleteStore();
            }

            store.ConnectionBehavior = ConnectionBehavior.Persistent;

            Stopwatch sw = new Stopwatch();

            sw.Start();
            store.DiscoverTypes(Assembly.GetExecutingAssembly());
            sw.Stop();
            Debug.WriteLine(string.Format("SQL CE Store Discover:\t{0}s", sw.Elapsed.TotalSeconds));

            sw.Start();
            store.CreateStore();
            sw.Stop();
            Debug.WriteLine(string.Format("SQL CE Store Create:\t{0}", sw.Elapsed.TotalSeconds));

            CreateTestData(store);

            return(store);
        }
Example #2
0
 private void DiscoverTypes(SqlCeDataStore store)
 {
     store.DiscoverTypes(Assembly.GetExecutingAssembly());
 }
 private void DiscoverTypes(SqlCeDataStore store)
 {
     store.DiscoverTypes(Assembly.GetExecutingAssembly());
 }
        public void Initialize()
        {
            Store = new SqlCeDataStore("pubs.sdf");
            if (Store.StoreExists)
            {
                Store.DeleteStore();
            }

            Store.ConnectionBehavior = ConnectionBehavior.Persistent;

            Stopwatch sw = new Stopwatch();

            sw.Start();
            Store.DiscoverTypes(Assembly.GetExecutingAssembly());
            sw.Stop();
            Debug.WriteLine(string.Format("SQL CE Store Discover:\t{0}s", sw.Elapsed.TotalSeconds));

            sw.Start();
            Store.CreateStore();
            sw.Stop();
            Debug.WriteLine(string.Format("SQL CE Store Create:\t{0}", sw.Elapsed.TotalSeconds));

            CreateTestData();
        }