public void BuyHint(QuestionObjectivePart questionObjective, TeamPart team) { Argument.ThrowIfNull(questionObjective, "questionObjective"); Argument.ThrowIfNull(team, "team"); if (questionObjective.HasHint && !questionObjective.HintUsedByTeams.Any(t => t.TeamPartRecord.ContentItemRecord.Id == team.ContentItem.Id)) { var teamUsedHint = new TeamUsedHintRecord { QuestionObjectivePartRecord = questionObjective.Record, TeamPartRecord = team.Record }; _teamUsedHintRepository.Create(teamUsedHint); //questionObjective.HintUsedByTeams.Add(new TeamUsedHintRecord //{ // QuestionObjectivePartRecord = questionObjective.Record, // TeamPartRecord = team.Record //}); } }
public static string BuyHint(this UrlHelper url, QuestionObjectivePart questionObjective) { return(url.Action("BuyHint", "QuestionObjective", new { id = questionObjective.ContentItem.Id, ReturnUrl = GetReturnUrl(), area = "DeSjoerd.Competition.ActionObjectives" })); }