From 7c33b3f334cf91918add7af08866f2ea37ed9c3f Mon Sep 17 00:00:00 2001 From: Melodi <62381002+Melodi17@users.noreply.github.com> Date: Thu, 3 Sep 2026 23:06:05 +1000 Subject: chore: initial commit --- src/marlin.web/Util/IQueryableExtensions.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/marlin.web/Util/IQueryableExtensions.cs (limited to 'src/marlin.web/Util') diff --git a/src/marlin.web/Util/IQueryableExtensions.cs b/src/marlin.web/Util/IQueryableExtensions.cs new file mode 100644 index 0000000..79b9cbe --- /dev/null +++ b/src/marlin.web/Util/IQueryableExtensions.cs @@ -0,0 +1,14 @@ +namespace marlin.web.Util; + +using System.Linq.Expressions; + +public static class IQueryableExtensions +{ + public static IQueryable WhereIf( + this IQueryable self, + bool cond, + Expression> predicate) + { + return cond ? self.Where(predicate) : self; + } +} \ No newline at end of file -- cgit v1.3.1