public BookingOrder(Trader trader, MarketProduct marketProduct, int amount, decimal threshold) { Trader = trader; TraderId = trader.Id; MarketProduct = marketProduct; ProductCode = marketProduct.ProductCode; Amount = amount; Threshold = threshold; Booked = false; }
public DepotTransaction(Trader trader, MarketProduct marketProduct, int amountPieces) { Depot = trader.Depot; DepotId = trader.Depot.Id; Product = marketProduct.Product; ProductCode = marketProduct.Product.Code; Amount = amountPieces; Price = marketProduct.Price; Time = DateTime.UtcNow; }