コード例 #1
0
        public virtual void When(IGoodIdentificationMvoStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
コード例 #2
0
        protected virtual IGoodIdentificationMvoStateDeleted Map(IDeleteGoodIdentificationMvo c)
        {
            var stateEventId = new GoodIdentificationMvoEventId(c.ProductGoodIdentificationId, c.ProductVersion);
            IGoodIdentificationMvoStateDeleted e = NewGoodIdentificationMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
コード例 #3
0
        public virtual GoodIdentificationMvoStateDeletedDto ToGoodIdentificationMvoStateDeletedDto(IGoodIdentificationMvoStateDeleted e)
        {
            var dto = new GoodIdentificationMvoStateDeletedDto();

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

            return(dto);
        }
コード例 #4
0
        public virtual void Delete(IDeleteGoodIdentificationMvo c)
        {
            IGoodIdentificationMvoStateDeleted e = Map(c);

            Apply(e);
        }