Details
In v2.18.0 was added IsValid(out List validationErrors) overloads for IGridifyFiltering with detailed error messages.
It works well, but only for Filter part of query. On top of that, interface IGridifyQuery inherits both IGridifyFiltering and IGridifyOrdering.
This can be quite misleading, and can be reason for runtime errors.
For example, developer might not notice that this overload works with IGridifyFilterig interface, and write something like that
using System;
using Gridify;
var mapper = new GridifyMapper<Person>()
.AddMap("Name", x=>x.name)
.AddMap("Age", x=>x.age);
var badOrderByQuery = new GridifyQuery(1,100,"Name=Ivan","ageee");
Console.WriteLine(badOrderByQuery.IsValid(out var errors, mapper)); //True
Console.WriteLine(badOrderByQuery.IsValid(mapper)); //False
record Person(string name, int age);
This is pretty counterintuitive from DevEx point of view.
I looked for other overloads but found nothing.
Details
In v2.18.0 was added IsValid(out List validationErrors) overloads for IGridifyFiltering with detailed error messages.
It works well, but only for Filter part of query. On top of that, interface IGridifyQuery inherits both IGridifyFiltering and IGridifyOrdering.
This can be quite misleading, and can be reason for runtime errors.
For example, developer might not notice that this overload works with IGridifyFilterig interface, and write something like that
This is pretty counterintuitive from DevEx point of view.
I looked for other overloads but found nothing.