public virtual void When(IGoodIdentificationMvoStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
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); }
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); }
public virtual void Delete(IDeleteGoodIdentificationMvo c) { IGoodIdentificationMvoStateDeleted e = Map(c); Apply(e); }