public async Task<bool> CreateAsync(NewsletterSubscriber dbSubscriber)
        {
            bool isDuplicate = false;

            using (WSDataContext context = new WSDataContext())
            {
                if (context.NewsletterSubscribers.Where(m => m.EmailAddress == dbSubscriber.EmailAddress).Count() == 0)
                {
                    if (HttpContext.Current != null && HttpContext.Current.Request != null)
                    {
                        dbSubscriber.IPAddress = HttpContext.Current.Request.UserHostAddress;
                    }
                    else
                    {
                        dbSubscriber.IPAddress = null;
                    }

                    context.NewsletterSubscribers.Add(dbSubscriber);
                    context.SaveChanges();

                    dbSubscriber.SubscriberId = dbSubscriber.SubscriberId;

                    NameValueCollection messageVars = new NameValueCollection();
                    messageVars.Add("%%NAME%%", dbSubscriber.Name);

                    MailManager.SendEmail("NewsletterSubscriptionConfirmation", dbSubscriber.Name, dbSubscriber.EmailAddress, null, messageVars);

                    WSConfigurationSection config = WSConfigurationManager.GetSection();

                    if (config.NewsletterSubscriberNotificationSubscribers != null && config.NewsletterSubscriberNotificationSubscribers.Count > 0)
                    {
                        List<string> subscriberEmails = new List<string>();

                        foreach (WSNotificationSubscriberElement subscriberConfig in config.NewsletterSubscriberNotificationSubscribers)
                        {
                            if (subscriberConfig.Enabled)
                            {
                                subscriberEmails.Add(subscriberConfig.EmailAddress);
                            }
                        }

                        messageVars = new NameValueCollection();
                        messageVars.Add("%%SUBSCRIBER_ID%%", dbSubscriber.SubscriberId.ToString());
                        messageVars.Add("%%DATE%%", dbSubscriber.CreatedDate.ToLongDateString());
                        messageVars.Add("%%NAME%%", dbSubscriber.Name);
                        messageVars.Add("%%EMAIL_ADDRESS%%", dbSubscriber.EmailAddress);
                        messageVars.Add("%%IP_ADDRESS%%", String.IsNullOrEmpty(dbSubscriber.IPAddress) ? "NA" : dbSubscriber.IPAddress);

                        MailManager.SendEmail("NewsletterSubscribed", subscriberEmails, null, messageVars);
                    }
                }
                else
                {
                    isDuplicate = true;
                }
            }

            return isDuplicate;
        }
        public async static void Subscribe(string list, NewsletterSubscriber subscriber)
        {
            MailChimpListSubscription subscription = new MailChimpListSubscription();
            var context = new WSDataContext();
            NewsletterManager manager = new NewsletterManager(context);
            
            subscription.Email = subscriber.EmailAddress;
            subscription.ListId = list;
            subscription.MergeData = new List<KeyValuePair<string, object>>();
            subscription.MergeData.Add(new KeyValuePair<string,object>("NAME",subscriber.Name));
            subscription.DoubleOptIn = true;
            subscription.ReplaceInterests = true;
            subscription.SendWelcome = false;
            subscription.UpdateExisting = false;
            MailChimpService service = new MailChimpService();
            await manager.CreateAsync(subscriber);
            service.Subscribe(subscription);
            
           
            

        }