protected virtual IWarehouseStateDeleted Map(IDeleteWarehouse c) { var stateEventId = new WarehouseEventId(c.WarehouseId, c.Version); IWarehouseStateDeleted e = NewWarehouseStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
protected virtual IWarehouseStateDeleted Map(IDeleteWarehouse c) { var stateEventId = new WarehouseStateEventId(c.WarehouseId, c.Version); IWarehouseStateDeleted e = NewWarehouseStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }
protected virtual IWarehouseStateDeleted Map(IDeleteWarehouse c) { var stateEventId = new WarehouseStateEventId(c.WarehouseId, c.Version); IWarehouseStateDeleted e = NewWarehouseStateDeleted(stateEventId); ReflectUtils.CopyPropertyValue("CommandId", c, e); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }
public virtual void When(IDeleteWarehouse c) { Update(c, ar => ar.Delete(c)); }
void IWarehouseApplicationService.When(IDeleteWarehouse c) { this.When((DeleteWarehouseDto)c); }
public virtual void Delete(IDeleteWarehouse c) { IWarehouseStateDeleted e = Map(c); Apply(e); }