public MarketRequestorApiController(IRequestorMarketProcessor marketProcessor, ISubscriptionRepository subscriptionRepository, IProposalRepository proposalRepository, IAgreementRepository agreementRepository, MarketRequestorEventMapper requestorEventMapper, DemandMapper demandMapper, OfferMapper offerMapper) { this.MarketProcessor = marketProcessor; this.SubscriptionRepository = subscriptionRepository; this.ProposalRepository = proposalRepository; this.AgreementRepository = agreementRepository; this.RequestorEventMapper = requestorEventMapper; this.DemandMapper = demandMapper; this.OfferMapper = offerMapper; }
public MarketProviderApiController(IProviderMarketProcessor marketProcessor, ISubscriptionRepository subscriptionRepository, IProposalRepository proposalRepository, IAgreementRepository agreementRepository, MarketProviderEventMapper providerEventMapper, OfferMapper offerMapper, DemandMapper demandMapper, ILogger <MarketProviderApiController> logger) { this.MarketProcessor = marketProcessor; this.SubscriptionRepository = subscriptionRepository; this.ProposalRepository = proposalRepository; this.AgreementRepository = agreementRepository; this.ProviderEventMapper = providerEventMapper; this.OfferMapper = offerMapper; this.DemandMapper = demandMapper; this._logger = logger; }
public async Task <IEnumerable <Demand> > GetBuyerDemands(Guid buyerId) { var buyerDemands = await _dbContext.Demands.Where(d => d.BuyerId.Equals(buyerId)).Include(d => d.DemandAttributeValues).ThenInclude(dav => dav.Attribute).ToListAsync(); return(buyerDemands.Select(d => DemandMapper.MapFrom(d))); }