public InventoryItem(Guid id, string name) { var evt = new InventoryItemCreatedAdded() { Id = id, Name = name }; RaiseEvent(evt); }
public bool Equals(InventoryItemCreatedAdded other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other.Id.Equals(Id) && Equals(other.Name, Name); }
public void Apply(InventoryItemCreatedAdded e) { Id = e.Id; }