Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
 }
Example #6
0
        public virtual void Delete(IDeleteWarehouse c)
        {
            IWarehouseStateDeleted e = Map(c);

            Apply(e);
        }