I am using Dapper Extension method GetByPredicate and passing the predicate value with Like operator.
Predicates.Field<Entity>(row => row, Operator.Like, $"%{string}%")
But while matching the string pattern it is returning results in reverse order, eg: if the sql table contains rows having 'test1' and 'test2' string then for a given string 'test', it is returning results as test2 and test1.
Wondering why it is returning in reversed order.
Relational databases usually do not guarantee order in which rows are returned. If you want you rows returned in specific order use
order byclause for this purpose.