public void CheckEvent(Event @event) { var products = _viagogoConnector.GetProduct(@event.Url); IEnumerable <Subscription> subscriptions = _subscriptionRepository.GetSubscriptionsByEvent(@event.Code); foreach (var subscription in subscriptions) { var productDtosToSend = subscription.Match(products); _mailerService.SendAlert(subscription.Email, @event.Name, productDtosToSend, subscription.CodeSubscription); subscription.SetUrlSended(productDtosToSend.Select(x => new Url(x.BuyUrl))); _subscriptionRepository.Save(); } }