Migrating to LinqProvider.V3

I’m trying to migrate to the new linq3, I have hundreds of queries that does not work anymore! I didn’t find any documents regarding to upgrade. I tried mongodb.analyzer nothing actionable! it’s too buggy to consider it useful.

An example would be this query that works with v2 perfectly. Not with V3

var query = _dbContext
.GetCollection()
.Find(p => true)
.SortByDescending(p => p.CreatedDate)
.Skip(parameters.Skip)
.Limit(parameters.Take)
.Project(p => new PartnerListModel
{
Id = p.Id,
Name = p.Name,
Status = String.Join(", ", p.Types.Select(p => PartnerProgram.FromCode(p.PartnerProgram).Name + ": " + p.Status.ToString()))
})
.ToList();

Also, A go to hell for MongoDB C# team. Nothing in the driver is good!

Hi @Nima_Niazmand ,

What driver version are you on? Client side projection support to the LINQ3 provider was added in v3.0 of the driver. You need to enable it via the MongoClientSettings as mentioned here in the last bullet. Hope that helps.

Thanks,

Rishit.