protected virtual IDocumentTypeStateCreated Map(ICreateDocumentType c) { var stateEventId = new DocumentTypeEventId(c.DocumentTypeId, c.Version); IDocumentTypeStateCreated e = NewDocumentTypeStateCreated(stateEventId); e.Description = c.Description; e.ParentDocumentTypeId = c.ParentDocumentTypeId; 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); }
public virtual void When(ICreateDocumentType c) { Update(c, ar => ar.Create(c)); }
void IDocumentTypeApplicationService.When(ICreateDocumentType c) { this.When((CreateDocumentTypeDto)c); }
public virtual void Create(ICreateDocumentType c) { IDocumentTypeStateCreated e = Map(c); Apply(e); }