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;
 }
예제 #3
0
 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;
 }
예제 #4
0
        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>());
        }
예제 #5
0
 public RoundtripForcedSellingDomainEvent(string roundtripId, RoundtripStatus roundtripStatus)
 {
     RoundtripId     = roundtripId ?? throw new ArgumentNullException(nameof(roundtripId));
     RoundtripStatus = roundtripStatus ?? throw new ArgumentNullException(nameof(roundtripStatus));
 }