public void Handle(DeadlineOnTaskChanged @event) { using (var session = _documentStore.OpenSession()) { var taskInGridView = session.Load <TaskInGridView>(@event.TaskId); taskInGridView.Deadline = @event.NewDeadline; session.SaveChanges(); } }
private void Apply(DeadlineOnTaskChanged @event) { _deadline = new TaskDeadline(DateTime.Parse(@event.NewDeadline)); }
protected bool Equals(DeadlineOnTaskChanged other) { return(string.Equals(NewTitle, other.NewDeadline) && string.Equals(TaskId, other.TaskId)); }