public JsonResult AddParticipantToGroup(int groupID, int participantID) { ParticipantsInGroup newPar = new ParticipantsInGroup(); newPar.GroupsID = groupID; newPar.ParticipantsID = participantID; _unitOfWork.ParticipantsInGroup.Add(newPar); _unitOfWork.Save(); return(Json(groupID)); }
public ActionResult Test1(int ID) { ParticipantsInGroup pg = _unitOfWork.ParticipantsInGroup.Get(ID); Test1 model = new Test1(); model.Group = _unitOfWork.Groups.GetGroupWithParticipants(pg.GroupsID); model.Questions = _unitOfWork.Question.OrderedQuestions(); model.AssessingParticipantID = pg.ParticipantsID; model.StartTime = DateTime.Now; return(View(model)); }