IEnumerable to Object?
<p>I'm a little confused on how exactly this works. I have an <code>IEnumerable&lt;T&gt;</code> list that I'm pulling from a stored procedure in a mySQL database.</p>
<pre><code>IEnumerable&lt;CheckInVar&gt; CheckInVars = 
    context.Database
           .SqlQuery&lt;CheckInVar&gt;(&quot;Call getCheckinVars(\&quot;WEB\&quot;)&quot;).ToList();
</code></pre>
<p>Now, do I need to loop through this object to pull out the properties so that I can use them such as this?</p>
<pre><code>foreach (var prop in CheckInVars.GetType().GetProperties())
{
    Console.WriteLine(&quot;{0} = {1}&quot;, prop.Name, prop.GetValue(CheckInVars, null));
}
</code></pre>
<p>Or can I directly work off of that <code>IEnumerable&lt;CheckInVar&gt;</code> object, or do I need to convert that to work with it?</p>
<pre><code>public class CheckInVar
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.None)]
    [Column(&quot;ID&quot;)]
    public int ID { get; set; }
    public string Code { get; set; }
    public string VarValue { get; set; }
    public string AccessMethod { get; set; }
    public string Active { get; set; }
    public string DateCreated { get; set; }
    public string DateUpdated { get; set; }
    public string UpdatedBy { get; set; }
}
</code></pre>