예제 #1
0
        protected virtual IAttributeStateDeleted Map(IDeleteAttribute c)
        {
            var stateEventId         = new AttributeStateEventId(c.AttributeId, c.Version);
            IAttributeStateDeleted e = NewAttributeStateDeleted(stateEventId);

            ReflectUtils.CopyPropertyValue("CommandId", c, e);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;


            return(e);
        }
예제 #2
0
        protected virtual IAttributeStateDeleted Map(IDeleteAttribute c)
        {
            var stateEventId         = new AttributeStateEventId(c.AttributeId, c.Version);
            IAttributeStateDeleted e = NewAttributeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;


            return(e);
        }
예제 #3
0
        protected virtual IAttributeStateDeleted Map(IDeleteAttribute c)
        {
            var stateEventId         = new AttributeEventId(c.AttributeId, c.Version);
            IAttributeStateDeleted e = NewAttributeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();


            return(e);
        }
예제 #4
0
 public virtual void When(IDeleteAttribute c)
 {
     Update(c, ar => ar.Delete(c));
 }
예제 #5
0
 void IAttributeApplicationService.When(IDeleteAttribute c)
 {
     this.When((DeleteAttributeDto)c);
 }
예제 #6
0
        public virtual void Delete(IDeleteAttribute c)
        {
            IAttributeStateDeleted e = Map(c);

            Apply(e);
        }