title: .Net MongoDB, Finding documents of custom class
body: <p>Here is the sample data from a collection. Basically the only thing that I am trying to do is read all of the data like this in as a "Student" but it is throwing an error for some reason. It works fine when I read them all in as Bson documents but that is not what I want to do. Here is the error:</p>
  
  <p>An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll</p>
  
  <p>Additional information: One or more errors occurred.</p>
  
  <p>what am I doing wrong?</p>
  
  <p>{
      "_id" : 137,
      "name" : "Tamika Schildgen",
      "scores" : [
          {
              "type" : "exam",
              "score" : 4.433956226109692
          },
          {
              "type" : "quiz",
              "score" : 65.50313785402548
          },
          {
              "type" : "homework",
              "score" : 89.5950384993947
          }
      ]
  }</p>
  
  <pre><code>    static async Task MainAsync(string[] args)
      {
          var client = new MongoClient();
          var db = client.GetDatabase("school");
          var col = db.GetCollection&lt;Student&gt;("students");
  
          var list = await col.Find(new BsonDocument())
              .ToListAsync();
  
          foreach(var doc in list)
          {
              Console.WriteLine(doc);
          }
  
      }
  }
  
  class Student
  {
      public ObjectId Id { get; set; }
      public string name { get; set; }
      public Scores[] scores { get; set; }
  
  }
  class Scores
  {
      public string type { get; set; }
      public double score { get; set; }
  }
  </code></pre>