Should add Product's Id to the ProductStockCountChangedEto event.

pull/819/head
Halil ibrahim Kalkan 7 years ago
parent ee680a084e
commit 55f14846c9

@ -91,7 +91,13 @@ namespace ProductManagement
if (triggerEvent)
{
AddDistributedEvent(new ProductStockCountChangedEto(StockCount, stockCount));
AddDistributedEvent(
new ProductStockCountChangedEto(
Id,
StockCount,
stockCount
)
);
}
StockCount = stockCount;

@ -6,6 +6,8 @@ namespace ProductManagement
[Serializable]
public class ProductStockCountChangedEto : EtoBase
{
public Guid Id { get; }
public int OldCount { get; set; }
public int CurrentCount { get; set; }
@ -15,8 +17,9 @@ namespace ProductManagement
//Default constructor is needed for deserialization.
}
public ProductStockCountChangedEto(int oldCount, int currentCount)
public ProductStockCountChangedEto(Guid id, int oldCount, int currentCount)
{
Id = id;
OldCount = oldCount;
CurrentCount = currentCount;
}

Loading…
Cancel
Save