Added very nice DataGrid control

This commit is contained in:
2020-08-04 22:47:35 +02:00
parent 8eace42aaa
commit 5d3c64d193
20 changed files with 157 additions and 376 deletions

View File

@ -0,0 +1,17 @@
using System.Linq.Expressions;
// ReSharper disable once CheckNamespace
namespace System.Linq
{
public static class Queryable
{
/// <summary>
/// Makes a where filtering, if it is not null.
/// </summary>
public static IQueryable<TSource> WhereOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>>? predicate)
{
if (source == null) throw new ArgumentNullException(nameof(source));
return predicate is null ? source : source.Where(predicate);
}
}
}