Exemple #1
0
        public async Task <HttpResponseMessage> AddSubscription(PushSubscription subscription)
        {
            Random random = new Random();
            int    Id     = random.Next(1000);
            var    sub    = new MBSubscription
            {
                UserId           = Id.ToString(),
                PushSubscription = subscription
            };
            var subscriptionService = new SubscriptionService();
            var result = await subscriptionService.AddSubscription(sub);

            return(Request.CreateResponse(HttpStatusCode.OK, result));
        }
        public async Task <MBSubscription> AddSubscription(MBSubscription subscription)
        {
            var result = await this.supscriptionRepo.AddSubscription(subscription);

            return(result);
        }