protected virtual ILotStateCreated Map(ICreateLot c) { var stateEventId = new LotEventId(c.LotId, c.Version); ILotStateCreated e = NewLotStateCreated(stateEventId); e.Quantity = c.Quantity; e.ExpirationDate = c.ExpirationDate; e.Active = c.Active; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; return(e); }
void ILotApplicationService.When(ICreateLot c) { this.When((CreateLotDto)c); }
public virtual void Create(ICreateLot c) { ILotStateCreated e = Map(c); Apply(e); }
public virtual void When(ICreateLot c) { Update(c, ar => ar.Create(c)); }