Exemple #1
0
        protected virtual IStatusItemStateCreated Map(ICreateStatusItem c)
        {
            var stateEventId          = new StatusItemEventId(c.StatusId, c.Version);
            IStatusItemStateCreated e = NewStatusItemStateCreated(stateEventId);

            e.StatusTypeId = c.StatusTypeId;
            e.StatusCode   = c.StatusCode;
            e.SequenceId   = c.SequenceId;
            e.Description  = c.Description;
            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);
        }
 void IStatusItemApplicationService.When(ICreateStatusItem c)
 {
     this.When((CreateStatusItemDto)c);
 }
 public virtual void When(ICreateStatusItem c)
 {
     Update(c, ar => ar.Create(c));
 }
Exemple #4
0
        public virtual void Create(ICreateStatusItem c)
        {
            IStatusItemStateCreated e = Map(c);

            Apply(e);
        }