3 ms·
> public void RemoveItems(Func<Item, bool> condition) Tangential, but remember that you can't generally push this condition over a database connection. You've
by tommiegannert 2y ago
> public void RemoveItems(Func<Item, bool> condition)
Tangential, but remember that you can't generally push this condition over a database connection. You've just forced your code to be best-case O(n).
Using structured queries as far as possible is useful for performance. But consider what happens if you create a Predicate structure, and someone adds a field without updating the Remove function to match... Perhaps a recursive discriminated union is the way to go, for languages that fail compilation when not all branches are covered? Positional arguments in other languages?