public RoundtripEntryDomainEvent(string investmentId, string roundtripId, RoundtripStatus roundtripStatus, Market market, DateTime entryAt, Transaction transaction) { InvestmentId = investmentId; RoundtripId = roundtripId; RoundtripStatus = roundtripStatus; Market = market; EntryAt = entryAt; Transaction = transaction; }
public RoundtripEntryOrderSubmittedDomainEvent(string investmentId, string roundtripId, RoundtripStatus roundtripStatus, Market market, decimal entryAmount, decimal entryPrice, DateTime adviceCreationDate) { InvestmentId = investmentId; RoundtripId = roundtripId; RoundtripStatus = roundtripStatus; Market = market; EntryAmount = entryAmount; EntryPrice = entryPrice; AdviceCreationDate = adviceCreationDate; }
public RoundtripExitOrderSubmittedDomainEvent(Roundtrip roundtrip, string investmentId, string roundtripId, RoundtripStatus roundtripStatus, Market market, decimal exitAmount, decimal exitPrice, DateTime adviceCreationDate) { Roundtrip = roundtrip; InvestmentId = investmentId; RoundtripId = roundtripId; RoundtripStatus = roundtripStatus; Market = market; ExitAmount = exitAmount; ExitPrice = exitPrice; AdviceCreationDate = adviceCreationDate; }
public async Task <IEnumerable <Roundtrip> > GetByStatus(RoundtripStatus status) { var roundtrips = _context.Roundtrips .Where(r => r.GetStatus().Id == status.Id); if (roundtrips.Any()) { foreach (var roundtrip in roundtrips) { await _context.Entry(roundtrip) .Reference(r => r.RoundtripStatus).LoadAsync(); } return(roundtrips); } return(new List <Roundtrip>()); }
public RoundtripForcedSellingDomainEvent(string roundtripId, RoundtripStatus roundtripStatus) { RoundtripId = roundtripId ?? throw new ArgumentNullException(nameof(roundtripId)); RoundtripStatus = roundtripStatus ?? throw new ArgumentNullException(nameof(roundtripStatus)); }