public IActionResult Delete(Guid id) { var item = _reportDatabase.GetById(id); _commandBus.Send(new DeleteItemCommand(item.Id, item.Version)); return(RedirectToAction("Index")); }
public ActionResult Delete(Guid id) { var item = _db.GetById(id); _mediator.Send(new DeleteItemCommand(item.Id, item.Version)); return(RedirectToAction("Index")); }
public void Handle(ItemFromChangedEvent eventInstance) { var item = _reportDatabase.GetById(eventInstance.AggregateId); item.From = eventInstance.From; item.Version = eventInstance.Version; }
public void Handle(ItemRenamedEvent handle) { var item = _reportDatabase.GetById(handle.AggregateId); item.Title = handle.Title; item.Version = handle.Version; }
public void Handle(ItemChangeDescriptionEvent e) { var item = _reportDatabase.GetById(e.AggregateId); item.Description = e.Description; item.Version = e.Version; }
void IEventHandler <StudentAverageCalculatedEvent> .Handle(StudentAverageCalculatedEvent handle) { var item = _reportDatabase.GetById(handle.AggregateId); regNumber = handle.regNumber; name = handle.name; }
public void Handle(ItemToChangedEvent e) { var item = _reportDatabase.GetById(e.AggregateId); item.To = e.To; item.Version = e.Version; }
public void Handle(ItemDescriptionChangedEvent handle) { var item = _reportDatabase.GetById(handle.AggregateId); item.Description = handle.Description; item.Version = handle.Version; }
public void Handle(ItemChangedTitleEvent e) { var item = _reportDatabase.GetById(e.AggregateId); item.Title = e.Title; item.Version = e.Version; }
public void Handle(ItemFromChangedEvent handle) { var item = _reportDatabase.GetById(handle.AggregateId); item.From = handle.From; item.Version = handle.Version; }
void IEventHandler <StudentEnrolledToSubjectEvent> .Handle(StudentEnrolledToSubjectEvent handle) { var item = _reportDatabase.GetById(handle.AggregateId); regNumber = handle.regNumber; name = handle.name; }
public void Handle(RoomCheckedInEvent handle) { var item = _reportDatabase.GetById(handle.AggregateId); item.IsCheckedIn = handle.IsCheckedIn; item.Version = handle.Version; }
public void Handle(ItemRenamedEvent eventInstance) { var item = _reportDatabase.GetById(eventInstance.AggregateId); item.Title = eventInstance.Title; item.Version = eventInstance.Version; }
public Task Handle(ItemToChangedEvent handle, CancellationToken token) { var item = _reportDatabase.GetById(handle.AggregateId); item.To = handle.To; item.Version = handle.Version; return(Task.CompletedTask); }
void IEventHandler <SubjectSituationShowedEvent> .Handle(SubjectSituationShowedEvent handle) { var item = _reportDatabase.GetById(handle.AggregateId); credits = handle.credits; enrolledStudents = handle.enrolledStudents; professor = handle.professor; prop = handle.prop; subjectName = handle.subjectName; type = handle.type; }