Esempio n. 1
0
 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>
                  ());
     }
 }
Esempio n. 2
0
        public void Should_return_name_for_property()
        {
            string alias = Strong <CmsPage> .Name(x => x.Alias);

            Assert.AreEqual("Alias", alias);
        }
Esempio n. 3
0
        public void Should_return_poperty_name_for_inherited_property()
        {
            string createdAt = Strong <CmsPage> .Name(x => x.CreatedAt);

            Assert.AreEqual("CreatedAt", createdAt);
        }
Esempio n. 4
0
        public void Should_return_name_for_method()
        {
            string homeContent = Strong <HomeController> .Name(x => x.Content(1, "hello"));

            Assert.AreEqual("Content", homeContent);
        }