public ActionResult Update(int id) { vmBulletinCreate bc = new vmBulletinCreate(); bc.bulletin = _bulletinService.Get(id); bc.ContentText = bc.bulletin.ContentText; return(View(bc)); }
/// <summary> /// Details of a bulletin. /// </summary> //[OutputCache(Duration = 60, VaryByParam = "id") ] public ActionResult Bulletin(int id) { var model = BulletinService.Get(id); if (UserService.IsInContract(model.BulletinContracts)) { return(View((model).ToBulletinViewModel())); } else { throw new SecurityException("You don't have access to this bulletin."); } }