private PhraseVoteHistory(PhraseId phraseId, UserId userId, int score) { Id = new PhraseVoteHistoryId(Guid.NewGuid()); PhraseId = phraseId; UserId = userId; _utcDateVoted = DateTime.UtcNow; _score = score; AddDomainEvent(new PhraseVoteHistoryCreatedDomainEvent(Id, phraseId, userId, score)); }
private Phrase(MatchId matchId, TeamId teamId, UserId createdByUserId, string description, bool positive) { Id = new PhraseId(Guid.NewGuid()); _matchId = matchId; _teamId = teamId; _createdByUserId = createdByUserId; _description = description; _positive = positive; _dateCreated = DateTime.UtcNow; _score = 0; _phraseVoteHistory = new List <PhraseVoteHistory>(); AddDomainEvent(new PhraseCreatedDomainEvent(Id, matchId, teamId, createdByUserId, description, positive, _dateCreated)); }
internal static PhraseVoteHistory CreateNew(PhraseId phraseId, UserId userId, int score) { return(new PhraseVoteHistory(phraseId, userId, score)); }