Ejemplo n.º 1
0
        public void Can_GetFirstColumnDistinct()
        {
            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.ColumnDistinct <int>("SELECT Id FROM ModelWIN");

                Assert.That(ids.Count, Is.EqualTo(n));
            }
        }
		public void Can_GetFirstColumnDistinct()
		{
			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.ColumnDistinct<int>("SELECT Id FROM ModelWIN");

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