public Atom10FeedFormatter GetContacts()
    {
      var items = new List<SyndicationItem>();

      var repository = new ContactsRepository();

      foreach (Contact contact in repository.GetContactsForUser(Thread.CurrentPrincipal.Identity.Name))
      {
        items.Add(new SyndicationItem
          {
            Id = String.Format(CultureInfo.InvariantCulture, "http://contacts.org/{0}", Guid.NewGuid()),
            Title = new TextSyndicationContent(contact.FullName),
            LastUpdatedTime = DateTime.UtcNow,
            Authors =
              {
                new SyndicationPerson
                  {
                    Name = "Sample Author"
                  }
              },
            Content = new TextSyndicationContent(contact.Email),
          });
      }

      // create the feed containing the syndication items.

      var feed = new SyndicationFeed
        {
          // The feed must have a unique stable URI id

          Id = "http://contacts/Feed",
          Title = new TextSyndicationContent("Contacts feed"),
          Items = items
        };

      feed.AddSelfLink(WebOperationContext.Current.IncomingRequest.GetRequestUri());

      WebOperationContext.Current.OutgoingResponse.ContentType = ContentTypes.Atom;

      return feed.GetAtom10Formatter();
    }