示例#1
0
        private void InitializeAllPostsList()
        {
            Exception       ex      = null;
            List <object[]> records = DBObjCreator.ReadDBObjs("TP_GetAllPosts", ref ex);
            List <Post>     posts   = new List <Post>();

            records.ForEach(r => posts.Add(DBObjCreator.CreateObj <Post>(r, typeof(Post))));
            Session["AllPosts"]    = posts;
            repeaterAll.DataSource = posts;
            repeaterAll.DataBind();
        }