The use of '.' in the key of a SortedList causes problems when saving in MongoDB because the '.' denotes the lower level.
Ex:
UpdateDefinition<User> updateDefinition = Builders<User>.Update.Set("lesPortefeuilles.sorPortefeuilles." + strName, value);
does not allow a key to contain a '.'
It's ok for "lesPortefeuilles.sorPortefeuilles." but not for strName if strName contains a '.'.
Ex: if strName = "Jimmy.Hendrix" this does not work.
I tried replacing '.' by "." without success.
Do you have a solution, please?