public static void Create <TCommand, TTarget>(this ICommandExecutionContext context, ITypedCommandHandler <TCommand, TTarget> handler) where TCommand : TypedCommand <TTarget> { var typeAttribute = AttributeBasedObjectTypeMapping.GetTypeAttibute(typeof(TTarget)); context.Create(ObjectTypeId.Parse(typeAttribute.TypeIdValue)); }
public void Handle(TestingCommand command, ICommandExecutionContext context) { context.Create(this); }
public void Handle(CreateUnitCommand command, ICommandExecutionContext context) { context.Create(this); context.ModifyAttribute(this, x => x.Name, command.Name); context.ModifyAttribute(this, x => x.Address, command.Address); }
public void Handle(CreateHierarchyCommand command, ICommandExecutionContext context) { context.Create(this); }
public void Handle(CreateHierarchyNodeCommand command, ICommandExecutionContext context) { context.Create(this); context.Attach(this, x => x.Unit, command.UnitId); context.Attach(this, x => x.Context, command.HierarchyId); }
public void Handle(CreateObjectCommand command, ICommandExecutionContext context) { context.Create(command.ObjectTypeId); }