Example #1
0
        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);
 }
Example #3
0
        public virtual void Create(ICreateLot c)
        {
            ILotStateCreated e = Map(c);

            Apply(e);
        }
Example #4
0
 public virtual void When(ICreateLot c)
 {
     Update(c, ar => ar.Create(c));
 }