public void Handle(ContactDeleted @event)
 {
     using (var context = new ProjectionContext(ConnectionString.Get()))
     {
         var entity = context.GetEntity <ContactSqlEntity>(@event.AggregateId);
         entity.Removed = true;
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public void DeleteFromList(string str)
 {
     if (Book.Contains(str))
     {
         Book.Remove(str);
         ContactDeleted?.Invoke($"Contact {str} deleted from the list");
     }
     else
     {
         ContactDeleted?.Invoke($"Contact {str} does not exist in the list");
     }
 }
Exemplo n.º 3
0
 public void Apply(ContactDeleted e)
 {
 }
Exemplo n.º 4
0
 public void Handle(ContactDeleted e)
 {
     _repositoryAsync.DeleteAsync(e.Id);
 }
Exemplo n.º 5
0
 private void OnContactDeleted(ContactEventArgs e)
 {
     ContactDeleted?.Invoke(this, e);
 }