Foreach in List<t> facebook friends
<p>Hi folks
I am fairly new to C# advanced topics. This is what I am trying to do.. 
Get Facebook friends data and insert into db. 
For getting the friends from FB, i am using json.</p>

<pre><code>url = "https://graph.facebook.com/me/friends?fields=id,name,picture,link&amp;access_token=" + oAuth.Token;
json = oAuth.WebRequest(oAuthFacebook.Method.GET, url, String.Empty);                    
Friends frnds = js.Deserialize&lt;Friends&gt;(json);
</code></pre>

<p>Now how do I insert this frnds in the database
I have the following class file Friends.cs </p>

<pre><code>namespace TestConnect
{
    public class Friends
    {
        public List&lt;Friend&gt; data { get; set; }   
    }
    public class Friend
    {
        public string name { get; set; }
        public string id { get; set; }
        public string picture { get; set; }
        public string link { get; set; }

    }    
}
</code></pre>

<p>Now if I do <code>foreach(Friends lf in data)</code> foreach has a getenumerator missing error 
Please suggest some way..Not sure if I am complicating it.. which I tend to do sometimes</p>

<p>Thanks
SC</p>
