public Task Handle(JobAssignWeeksChangedEvent message) { return(UpdateJobAssign(Guid.Parse(message.SourceId), Builders <JobAssign> .Update.Set(f => f.WeekList, message.Weeks), Builders <JobAssign> .Update.Set(f => f.IsLocalIntervalChanged, message.IsLocalIntervalChanged), Builders <JobAssign> .Update.Set(f => f.ChangedByRole, message.ChangedByRole))); }
private void Apply(JobAssignWeeksChangedEvent e) { WeekList = e.Weeks.ToList(); ChangedByRole = e.ChangedByRole; IsLocalIntervalChanged = e.IsLocalIntervalChanged; }