예제 #1
0
        public async Task <List <Subscriptions> > GetSubscriptionsAsync(MessageModel messageModel, ILogger logger)
        {
            logger.LogInformation("Getting Subscription Async");

            if (messageModel == null)
            {
                return(null);
            }


            var customerGuid       = messageModel.CustomerGuid;
            var senderTouchPointId = messageModel.TouchpointId;

            logger.LogInformation("Getting Subscription From DB");

            var subscriptions = await _dbProvider.GetSubscriptionsByCustomerIdAsync(customerGuid, senderTouchPointId);

            if (subscriptions != null)
            {
                logger.LogInformation(string.Format("Retrieved {0} Subscriptions From DB ", subscriptions.Count));
            }

            return(subscriptions);
        }