title: Contructor MongoDB.Bson.ObjectId() does not work in .NET Core 2
body: <p>I have a first project who tries to get a value from mongodb using MongoDB.Driver. I can connect to the database and "GetAll" but when make a request who need ObjectId i receive that Exception: </p>
  
  <pre><code>Exception has occurred: CLR/System.IndexOutOfRangeException
  An exception of type 'System.IndexOutOfRangeException' occurred in MongoDB.Bson.dll but was not handled in user code: 'Index was outside the bounds of the array.'
  </code></pre>
  
  <p>being more specific:</p>
  
  <pre><code>at MongoDB.Bson.ObjectId.FromByteArray(Byte[] bytes, Int32 offset, Int32&amp; a, Int32&amp; b, Int32&amp; c)
     at MongoDB.Bson.ObjectId..ctor(String value)
     at TodoApi.Controllers.TodoController.GetById(String id) ...
  </code></pre>
  
  <p><strong>Method GetById:</strong></p>
  
  <pre><code>[HttpGet("{id}", Name = "GetTodo")]
  public IActionResult GetById(string id)
  {
      var objId = new ObjectId(id); &lt;&lt; this line exceptions occures
      var item = objds.GetTodoItem(objId);
  
      if (item == null) { return NotFound(); }
  
      return new ObjectResult(item);
  }
  </code></pre>
  
  <p><strong>Methodo GetTodoItem from DataAcess:</strong></p>
  
  <pre><code>public TodoItem GetTodoItem(ObjectId id)
  {
      var res = Query&lt;TodoItem&gt;.EQ(p=&gt;p.Id,id);
      return _db.GetCollection&lt;TodoItem&gt;("TodoApi").FindOne(res);
  }
  </code></pre>
  
  <p><strong>.csproj</strong></p>
  
  <pre><code>  &lt;ItemGroup&gt;
      &lt;PackageReference Include="MongoDB.Driver" Version="2.5.0" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="MongoDB.Driver.Core" Version="2.5.0" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="MongoDB.Bson" Version="2.5.0" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="mongocsharpdriver" Version="2.5.0" /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>