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); }
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); }
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); }
public virtual void When(IDeleteAttribute c) { Update(c, ar => ar.Delete(c)); }
void IAttributeApplicationService.When(IDeleteAttribute c) { this.When((DeleteAttributeDto)c); }
public virtual void Delete(IDeleteAttribute c) { IAttributeStateDeleted e = Map(c); Apply(e); }