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;
 }
示例#2
0
 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;
 }
示例#3
0
        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)));
        }