Пример #1
0
        public async Task DataTableDictionaries()
        {
            using (var con = new SqlConnection(connectionString))
            {
                var sproc = new dboSelectMultipleStatement();

                var cmd = sproc.Build(con);

                var loader = new DynamicLoader();
                await con.OpenAsync();
                var adapter = new SqlDataAdapter(cmd);

                var ds = new DataSet();
                adapter.Fill(ds);
                var objs = loader.Dictionaries(ds.Tables[0]);

                Assert.IsNotNull(objs);

                var i = 0;
                foreach (var obj in objs)
                {
                    Assert.AreEqual(i, obj["Identifier"]);
                    i++;
                }
            }
        }
Пример #2
0
 public void DictionariesIDataReaderNull()
 {
     var l = new DynamicLoader();
     l.Dictionaries((IDataReader)null);
 }
Пример #3
0
 public void DictionariesDataSetNull()
 {
     var l = new DynamicLoader();
     l.Dictionaries((DataSet)null);
 }
Пример #4
0
 public void DictionariesIDbCommandNull()
 {
     var l = new DynamicLoader();
     l.Dictionaries((IDbCommand)null);
 }
Пример #5
0
        public async Task IDbCommandDictionaries()
        {
            using (var con = new SqlConnection(connectionString))
            {
                var sproc = new dboSelectMultipleStatement();

                var cmd = sproc.Build(con);

                var loader = new DynamicLoader();
                await con.OpenAsync();
                var objs = loader.Dictionaries(cmd);

                Assert.IsNotNull(objs);

                var i = 0;
                foreach (var obj in objs)
                {
                    Assert.AreEqual(i, obj["Identifier"]);
                    i++;
                }
            }
        }