Esempio n. 1
0
        public virtual void When(IGoodIdentificationTypeStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
        protected virtual IGoodIdentificationTypeStateDeleted Map(IDeleteGoodIdentificationType c)
        {
            var stateEventId = new GoodIdentificationTypeEventId(c.GoodIdentificationTypeId, c.Version);
            IGoodIdentificationTypeStateDeleted e = NewGoodIdentificationTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();


            return(e);
        }
Esempio n. 3
0
 void IGoodIdentificationTypeState.When(IGoodIdentificationTypeStateDeleted e)
 {
     throw new NotSupportedException();
 }
        public virtual void Delete(IDeleteGoodIdentificationType c)
        {
            IGoodIdentificationTypeStateDeleted e = Map(c);

            Apply(e);
        }
        public virtual GoodIdentificationTypeStateDeletedDto ToGoodIdentificationTypeStateDeletedDto(IGoodIdentificationTypeStateDeleted e)
        {
            var dto = new GoodIdentificationTypeStateDeletedDto();

            dto.GoodIdentificationTypeEventId = e.GoodIdentificationTypeEventId;
            dto.CreatedAt = e.CreatedAt;
            dto.CreatedBy = e.CreatedBy;
            dto.CommandId = e.CommandId;

            return(dto);
        }
Esempio n. 6
0
 public void AddGoodIdentificationTypeEvent(IGoodIdentificationTypeStateDeleted e)
 {
     _innerStateEvents.Add((GoodIdentificationTypeStateDeletedDto)e);
 }