コード例 #1
0
        public void ICriteria_AddInsensitiveLike()
        {
            var loaded = ParentCriteria.AddInsensitiveLike("Name", "Pa").List <Parent>();

            Assert.IsTrue(loaded.Count > 0);
            Assert.IsTrue(loaded.Any(p => p.Name.Contains("Pa")));
        }
コード例 #2
0
        public void ICriteria_AddInInG()
        {
            var ages = parentsInDB.Select(pdb => pdb.Age).ToArray();

            var loaded = ParentCriteria.AddInG("Age", ages).List <Parent>();

            Assert.IsTrue(loaded.Count > 0);
            Assert.AreEqual(ages.Length, loaded.Count);
        }
コード例 #3
0
        public void ICriteria_AddEqOrNull()
        {
            foreach (var parent in parentsInDB)
            {
                var loaded = ParentCriteria.AddEqOrNull("Name", parent.Name).UniqueResult <Parent>();

                Assert.IsNotNull(loaded);
                Assert.AreEqual(parent.Name, loaded.Name);
            }
        }
コード例 #4
0
        //public IScrollableResults Scroll()
        //{
        //    return ParentCriteria.Scroll();
        //}

        //public IScrollableResults Scroll(ScrollMode scrollMode)
        //{
        //    return ParentCriteria.Scroll(scrollMode);
        //}

        public object UniqueResult()
        {
            return(ParentCriteria.UniqueResult());
        }
コード例 #5
0
 public IList List()
 {
     // pass through to the parent
     return(ParentCriteria.List());
 }