Exemplo n.º 1
0
        public GetSubscriptionQueryResult Retrieve(GetSubscriptionQuery query)
        {
            EnsureArg.IsNotNull(query);

            var subscriptionsBySamePhoneNumber = SubscriptionsRepo.Search(s => s.PhoneNumber == query.Subscription.PhoneNumber);
            var mappedToDtos = Mapper.Map <IQueryable <SubscriptionModel> >(subscriptionsBySamePhoneNumber);
            var matches      = mappedToDtos.Where(s => s.SubcribedGameId == query.Subscription.SubcribedGameId);

            return(new GetSubscriptionQueryResult(matches));
        }
Exemplo n.º 2
0
        public IActionResult OnGet()
        {
            string StackholderId = User.Identity.Name;

            if (StackholderId != null)
            {
                AllSubscribers = _SubscriberData.GetAllSubscribersStack(StartDate, EndDate, StackholderId);
            }
            else if ((SearchTerm != null) || (StartDate != null) || (EndDate != null))
            {
                AllSubscribers = _SubscriberData.Search(SearchTerm, StartDate, EndDate);
            }
            return(Page());
        }