Esempio n. 1
0
        private void SetupSql()
        {
            _commandBuilder = new SqlCommandBuilder();
            _db             = new SqlConnection("Server=(localdb)\\ProjectsV12;Database=TestDictionary;Trusted_Connection=True");
            _db.Open();
            var formatter = new ProtobufValueFormatter();

            _uut = new SqlSortedDictionary <string, string>(_tableName, _db, formatter, _commandBuilder, false);
        }
Esempio n. 2
0
        private void SetupSqlCe()
        {
            _commandBuilder = new SqlCeCommandBuilder();
            if (File.Exists("TestingData.sdf"))
            {
                File.Delete("TestingData.sdf");
            }
            var engine = new SqlCeEngine("Data Source=TestingData.sdf;Persist Security Info=False;");

            engine.CreateDatabase();
            _db = new SqlCeConnection(engine.LocalConnectionString);
            _db.Open();
            var formatter = new ProtobufValueFormatter();

            _uut = new SqlCeSortedDictionary <string, string>(_tableName, _db, formatter, _commandBuilder);
        }