public void TestGetCriteriaByAlias() { Person personAlias = null; Person fatherAlias = null; DetachedCriteria criteria = DetachedCriteria <Person> .Create(() => personAlias) .CreateAlias(() => personAlias.Father, () => fatherAlias); Assert.AreEqual("personAlias", criteria.GetCriteriaByAlias(() => personAlias).Alias); Assert.AreEqual("fatherAlias", criteria.GetCriteriaByAlias(() => fatherAlias).Alias); }
public NHibernateDynamicQueryGenerator <EntityType> ToAlians(string alias) { query = query.GetCriteriaByAlias(alias); queryCount = queryCount.GetCriteriaByAlias(alias); return(this); }
public ICriteria GetCriteriaByAlias(string alias) { return(detachedCriteria.GetCriteriaByAlias(alias).Adapt(session)); }