Пример #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();
                }
            }
        }
Пример #2
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload)
 {
     OnOutcomeDeletedEvent();
     return(Task.CompletedTask);
 }
Пример #3
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload)
 => UpdateModel(payload, model => Models.Remove(model));
Пример #4
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload) => RaiseEvent(payload);
Пример #5
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload)
 {
     return(UpdateState(() => IsDeleted = true));
 }
Пример #6
0
 Task IEventHandler <OutcomeDeleted> .HandleAsync(OutcomeDeleted payload)
 {
     _ = LoadPageAsync();
     return(Task.CompletedTask);
 }