private void Handle(GoodsBlockDeletedEvent evnt) { _info = null; }
/// <summary> /// 更新 /// </summary> /// <param name="info"></param> public void Update(GoodsBlockInfo info) { info.CheckNotNull(nameof(info)); ApplyEvent(new GoodsBlockUpdatedEvent(info)); }
private void Handle(GoodsBlockUpdatedEvent evnt) { _info = evnt.Info; }
public GoodsBlock(Guid id, GoodsBlockInfo info) : base(id) { info.CheckNotNull(nameof(info)); ApplyEvent(new GoodsBlockCreatedEvent(info)); }