public override void Execute(ICommandContext context) { var root = context.TryLoad <SomeRoot>(SomeId) ?? context.Create <SomeRoot>(SomeId); root.PossiblyDoSomething(); }
public override void Execute(ICommandContext context) { var potato = context.TryLoad<Potato>(PotatoId) ?? context.Create<Potato>(PotatoId); potato.Bite(FractionToBiteOff); }
public override void Execute(ICommandContext context) { var potato = context.TryLoad <Potato>(PotatoId) ?? context.Create <Potato>(PotatoId); potato.Bite(FractionToBiteOff); }
public override void Execute(ICommandContext context) { var root = context.TryLoad<SomeRoot>(SomeId) ?? context.Create<SomeRoot>(SomeId); root.PossiblyDoSomething(); }
public override void Execute(ICommandContext context) { foreach (var id in Ids) { var root = context.TryLoad <Root>(id) ?? context.Create <Root>(id); root.Act(); } }
public override void Execute(ICommandContext context) { context.Create <Root>("root1").DoStuff(); context.Create <Root>("root2").DoStuff(); }
public override void Execute(ICommandContext context) { context .Create <Root>("root1") .MakeOtherRootDoStuff(); }
public override void Execute(ICommandContext context) { AggregateRootIds.Select(x => (context.TryLoad <MyRoot>(x) ?? context.Create <MyRoot>(x))).ToList().ForEach(r => r.EmitMyEvent()); AggregateRootIds.Select(x => (context.TryLoad <MyRoot>(x) ?? context.Create <MyRoot>(x))).ToList().ForEach(r => r.EmitMyEvent()); }