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"))); }
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); }
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); } }
//public IScrollableResults Scroll() //{ // return ParentCriteria.Scroll(); //} //public IScrollableResults Scroll(ScrollMode scrollMode) //{ // return ParentCriteria.Scroll(scrollMode); //} public object UniqueResult() { return(ParentCriteria.UniqueResult()); }
public IList List() { // pass through to the parent return(ParentCriteria.List()); }