Closed DMGlion closed 1 year ago
What version of MongoDB and the MongoDB driver are you using?
Hi @Turnerj I am using the version 2.19.0 MongoDB.Driver, 0.27.0 for MongoFramework and 0,27 for MongoFramework.Profiling.MiniProfiler.
Hi @Turner I got it working, For a certain reason I was getting the error because on the app web side I was running this 2 nuggets:
<PackageReference Include="MongoDB.Driver" Version="2.19.0" />
<PackageReference Include="MongoDB.Driver.Core" Version="2.19.0" />
I removed MongoDB.Driver and now is working like a charm. Anyone knows why thius 2 libraries together make the queries to fail?
The issue is with the v2.19.0 version of the MongoDB driver. They have a new internal LINQ provider which is affecting MongoFramework. Fortunately there is a way currently to set it back to the original provider which v0.28.0 of MongoFramework (which I just released) works around.
Try upgrading to MongoFramework v0.28.0 and it should solve your issue.
I am able to seed a database and populate with an admin tool, console application.
When I am seeding the database I am also able to query collections no issue:
_contextSeedModel.Find(id)
, I am getting the expected results no problem.When I am trying to execute the run time, I am getting an exception, I am using the same repository, context and models.