Example #1
0
        protected virtual IUomStateCreated Map(ICreateUom c)
        {
            var stateEventId   = new UomEventId(c.UomId, c.Version);
            IUomStateCreated e = NewUomStateCreated(stateEventId);

            e.UomTypeId    = c.UomTypeId;
            e.Abbreviation = c.Abbreviation;
            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(ICreateUom c)
 {
     Update(c, ar => ar.Create(c));
 }
Example #3
0
        public virtual void Create(ICreateUom c)
        {
            IUomStateCreated e = Map(c);

            Apply(e);
        }
Example #4
0
 void IUomApplicationService.When(ICreateUom c)
 {
     this.When((CreateUomDto)c);
 }