public Participant Execute(long id) { var participant = participantRepository.Get(id) ?? throw new ParticipantNotFoundException(id); Validate(participant); return(participant); }
public string AddComment(int orgId, string Comment) { Comment com = new Comment(); com.Comment1 = Comment; com.Organization = orgrep.Get(orgId); com.CommentDate = DateTime.Now; com.Participant = partrep.Get(1); commentrep.Add(com); return(com.Comment1); }
// // GET: /SkoleAdmin/Details/5 public ActionResult Details(int id) { var repo = new ParticipantRepository(); return(View(repo.Get(id))); }