Esempio n. 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);
        }
Esempio n. 2
0
 void ILotApplicationService.When(ICreateLot c)
 {
     this.When((CreateLotDto)c);
 }
Esempio n. 3
0
        public virtual void Create(ICreateLot c)
        {
            ILotStateCreated e = Map(c);

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