Example #1
0
        public void Can_GetFirstColumn()
        {
            const int n = 5;

            using (var db = new OrmLiteConnectionFactory(ConnectionString, FirebirdDialect.Provider).Open())
            {
                db.CreateTable <ModelWithIdAndName>(true);
                db.DeleteAll <ModelWithIdAndName>();

                n.Times(x => db.Insert(ModelWithIdAndName.Create(0)));

                var ids = db.Column <int>("SELECT Id FROM ModelWIN");

                Assert.That(ids.Count, Is.EqualTo(n));
            }
        }
		public void Can_GetFirstColumn()
		{
			const int n = 5;

            using (var db = new OrmLiteConnectionFactory(ConnectionString, FirebirdDialect.Provider).Open())
			{
				db.CreateTable<ModelWithIdAndName>(true);
				db.DeleteAll<ModelWithIdAndName>();

				n.Times(x => db.Insert(ModelWithIdAndName.Create(0)));

				var ids = db.Column<int>("SELECT Id FROM ModelWIN");

				Assert.That(ids.Count, Is.EqualTo(n));
			}
		}