Beispiel #1
0
 public void Handle(MarkedToDoItemAsCompletedEvent @event)
 {
     using (var db = new ToDoContext())
     {
         int      itemId = _identityMapper.GetModelId <ToDoItem>(@event.Id);
         ToDoItem item   = db.Items.First(t => t.Id.Equals(itemId));
         if (item != null)
         {
             item.ClosingDate     = @event.ClosingDate;
             db.Entry(item).State = EntityState.Modified;
             db.SaveChanges();
         }
     }
 }
Beispiel #2
0
 void Apply(MarkedToDoItemAsCompletedEvent @event)
 {
     ClosingDate = @event.ClosingDate;
 }
Beispiel #3
0
 void Apply(MarkedToDoItemAsCompletedEvent @event)
 {
     ClosingDate = @event.ClosingDate;
 }