protected void Page_Load(object sender, EventArgs e) { SqlDAO<Blog> sdao = new SqlDAO<Blog>(ConfigurationManager.ConnectionStrings["DB"].ConnectionString); List<Blog> results = sdao.get("", 0); Loader.load<Blog>(results, sdao.emulate<DataObject>(typeof(Blog))); rptExisting.DataSource = results; rptExisting.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { SqlDAO<Blog> blDao = new SqlDAO<Blog>(ConfigurationManager.ConnectionStrings["DB"].ConnectionString); List<Blog> bls = blDao.get("ORDER BY PostDate DESC",0); Loader.load<Blog>(bls, blDao.emulate<DataObject>(typeof(Blog))); rptNews.DataSource = bls; rptNews.DataBind(); }