Esempio n. 1
0
        public async Task HandleAsync(OutcomeDeleted payload)
        {
            using (ReadModelContext db = readModelContextFactory.Create())
            {
                OutcomeEntity entity = await db.Outcomes.FindAsync(payload.AggregateKey.AsGuidKey().Guid);

                if (entity != null)
                {
                    db.Outcomes.Remove(entity);
                    await db.SaveChangesAsync();
                }
            }
        }
Esempio n. 2
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload)
 {
     OnOutcomeDeletedEvent();
     return(Task.CompletedTask);
 }
Esempio n. 3
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload)
 => UpdateModel(payload, model => Models.Remove(model));
Esempio n. 4
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload) => RaiseEvent(payload);
Esempio n. 5
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload)
 {
     return(UpdateState(() => IsDeleted = true));
 }
Esempio n. 6
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload)
 {
     _ = LoadPageAsync();
     return(Task.CompletedTask);
 }