Hi all
can someone explains the next issue
I try to get data and have the error 'Cannot deserialize a ‘List’ from BsonType ‘String’
My data model has
public List<string>? Genres { get; set; }
Mongo shows data as an array
when I take data as BsonDocument I show an array
but when I try to use poco-class I have the error 'Cannot deserialize a ‘List’ from BsonType ‘String’
it is my query (but doesn’t work totally when I use poco class)
var distinctItems = movieCollection
.Distinct(x => x.Title.Genres, filter)
.ToList();
I have tried to add [BsonRepresentation(BsonType.Array)] but I have the same error
Please help to fix that. Thanks