Update EntityChanged sample

This commit is contained in:
Sipke Schoorstra 2021-01-08 11:40:07 +01:00
parent e53ce3478a
commit 17985aa1ae

View file

@ -14,10 +14,11 @@ namespace Elsa.Samples.EntityChanged
public void Build(IWorkflowBuilder workflow)
{
workflow
.WithContextType<Entity>()
.EntityChanged<Entity>(EntityChangedAction.Added)
.WriteLine(context => $"Entity '{context.GetInput<EntityChangedContext>().EntityId}' was '{context.GetInput<EntityChangedContext>().Action}'")
.WriteLine(context => $"Entity '{context.GetInput<EntityChangedContext>()!.EntityId}' was '{context.GetInput<EntityChangedContext>()!.Action}'")
.EntityChanged<Entity>(EntityChangedAction.Deleted)
.WriteLine(context => $"Entity '{context.GetInput<EntityChangedContext>().EntityId}' was '{context.GetInput<EntityChangedContext>().Action}'");
.WriteLine(context => $"Entity '{context.GetInput<EntityChangedContext>()!.EntityId}' was '{context.GetInput<EntityChangedContext>()!.Action}'");
}
}
}