Hello All,
I want to Sort the data in MongoDB collection, I am using
var res = await _dbcontext.CollectionName
.Find(filter,new FilterOptions{Collation = new Collation
("en",caseFirst:CollationCaseFirst.Upper,strength:CollationStrength.Tertiary)})
.Limit(limit)
.SortBy(i=>i.Name)
.ToListAsync(cancellationToken);
But I want the data like Upper case first in Sorted Order and then lower case in sorted order.
This query is sorting the data like
Ajay
andrew
ashish
Mark
but I want the result like
Ajay
Mark
andrew
ashish