Mongodb – Cannot deserialize a 'String' from BsonType 'ObjectId'
I am working a asp .net core project with mongoDb. I am trying to get hotel by hotelCode. HotelBedsContentService.cs public async Task<HotelDocument> GetHotel(int code) { var x = await HotelCollection.Find(x => x.Code == code).FirstOrDefaultAsync(); return x; } When passing this…