Пример #1
0
        protected virtual IRejectionReasonStateCreated Map(ICreateRejectionReason c)
        {
            var stateEventId = new RejectionReasonEventId(c.RejectionReasonId, c.Version);
            IRejectionReasonStateCreated e = NewRejectionReasonStateCreated(stateEventId);

            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);
        }
 public virtual void When(ICreateRejectionReason c)
 {
     Update(c, ar => ar.Create(c));
 }
Пример #3
0
        public virtual void Create(ICreateRejectionReason c)
        {
            IRejectionReasonStateCreated e = Map(c);

            Apply(e);
        }
 void IRejectionReasonApplicationService.When(ICreateRejectionReason c)
 {
     this.When((CreateRejectionReasonDto)c);
 }