AzureTicker.Worker.Model.Repositories.NotificationRepository.List C# (CSharp) Method

List() public method

public List ( ) : IEnumerable
return IEnumerable
        public IEnumerable<Notification> List()
        {
            CloudTableQuery<Notification> partitionQuery =
                (from n in context.CreateQuery<Notification>(tableName)
                select n).AsTableServiceQuery<Notification>();

            return partitionQuery.AsEnumerable();
        }

Usage Example

Beispiel #1
0
 public static void SendBillNotifications()
 {
     using (INotificationRepository rep = new NotificationRepository())
     {
         var notifications = rep.List();
         foreach (var n in notifications)
         {
             GetBillAndSendNotification(n);
         }
     }
 }