public ActionResult Edit(int id) { INewsDAC dac = new NewsDAC(); var news = dac.Get(id); var model = new NewsEdit { DateCreated=news.DateCreated,NewsID=news.NewsID,NewsText=news.NewsText,Subject=news.Subject }; return View(model); }
public ActionResult Blog(int pageNo = 1, int pageSize = 6) { INewsDAC dac = new NewsDAC(); int totalNoRecords; int startIndex = pageSize * (pageNo - 1); var news = dac.Get(null, "DateCreated DESC", startIndex, pageSize, out totalNoRecords); return View(news); }