Ejemplo n.º 1
0
        public async Task<bool> AddSubscriber(SeedDiscrepancy discrepancy)
        {
            var emailAddress = discrepancy.EmailAddress;
            var subscriberInStore = (await GetSubscribers(x => x.email.Trim() == emailAddress)).SingleOrDefault();

            if (subscriberInStore != null)
            {
                return await this.Update(subscriberInStore.SetMailable());
            }
            else
            {
                return await this.Add
                (
                    discrepancy
                        .ToSubscriber()
                        .SetMailable()
                        .Set(x => x.insertionDate, DateTime.Now)
                );
            }
        }
Ejemplo n.º 2
0
 public async Task<bool> EnableSubscriber(SeedDiscrepancy discrepancy)
 {
     return await this.Update(discrepancy.ToSubscriber().SetMailable());
 }