title: while loop Return Null Exception from SQL Table
body: <p>i wrote a while loop to find each person file number from a table and add it inside another class array but for some reason, it returns an Object reference not set to an instance of an object ERROR. Here is My Class</p>
  
  <pre><code>public class Person
  {
      public string IDENTITY { get; set; }
      public string Name { get; set; }
      public int Age { get; set; }    
  
      public class Exam[] Exams;
  
      public string Data { get; set; }
  }
  
  public class Exam
  {
    public string IDENTITY
    public string Name
    public int Pass_Score 
    public int Score 
    public string Grade 
  }
  </code></pre>
  
  <p>and I have a table for person and table for Exam, My Goal is to Connect each person with all the exams he has in the exam table to return it as XML file.</p>
  
  <pre><code>    [ResponseType(typeof(Person))]
      public async Task&lt;IHttpActionResult&gt; GetPerson(string id)
      {
          Person p = await db.Person.FindAsync(id);
          int count = db.Exam.Count();
  
          Exam fS = new Exam();
          int i = 0;
          while (i &lt; count) {
              if (fS.IDENTITY.Equals(p.IDENTITY)) {
                  Exam e = new Exam();
                  e.IDENTITY = fS.IDENTITY;
                  e.Name= fS.Name;
                  e.Pass_Score = fS.Pass_Score ;
                  e.Grade= fS.Grade;
                  e.Score = fS.Score ;
                  i++;
              };
          }
          if (p== null)
          {
              return NotFound();
          }
          return Ok(p);
      }
  </code></pre>
  
  <p>My Guess's the Error Comes from inside the While loop?</p>