public ActionResult View(Guid id)
{
var notification = RepositoryFactory.NotificationRepository.Queryable
.SingleOrDefault(x => x.Id == id);
if (notification == null)
{
return new HttpNotFoundResult();
}
notification.Pending = false;
RepositoryFactory.NotificationRepository.EnsurePersistent(notification);
var model = new NotificationViewModel
{
Notification = notification
};
return View(model);
}