示例#1
0
        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));
 }
示例#3
0
 void IDocumentTypeApplicationService.When(ICreateDocumentType c)
 {
     this.When((CreateDocumentTypeDto)c);
 }
示例#4
0
        public virtual void Create(ICreateDocumentType c)
        {
            IDocumentTypeStateCreated e = Map(c);

            Apply(e);
        }