public ICollection <IEntry> LoadLast(int numberOfLastPages) { using (ISession s = OpenSession()) { return (s.CreateCriteria(typeof(IEntry)).AddOrder( Order.Desc(Strong <IEntry> .Name(x => x.CreatedAt))).SetMaxResults(numberOfLastPages).List <IEntry> ()); } }
public void Should_return_name_for_property() { string alias = Strong <CmsPage> .Name(x => x.Alias); Assert.AreEqual("Alias", alias); }
public void Should_return_poperty_name_for_inherited_property() { string createdAt = Strong <CmsPage> .Name(x => x.CreatedAt); Assert.AreEqual("CreatedAt", createdAt); }
public void Should_return_name_for_method() { string homeContent = Strong <HomeController> .Name(x => x.Content(1, "hello")); Assert.AreEqual("Content", homeContent); }