diff --git a/Utils/Extensions.cs b/Utils/Extensions.cs index 47747c2..c42c2de 100644 --- a/Utils/Extensions.cs +++ b/Utils/Extensions.cs @@ -93,7 +93,7 @@ public static class Extensions } [Projectable] - public static IQueryable ApplyDateOnlyFrameQ(this IQueryable query, Func dateAcessor, DateOnlyFrame frame) => query.Where(e => dateAcessor(e) >= frame.fromDate && dateAcessor(e) <= frame.toDate); + public static IQueryable ApplyDateOnlyFrameQ(this IQueryable query, string datePropery, DateOnlyFrame frame) => query.Where(e => EF.Property(e, datePropery) >= frame.fromDate && EF.Property(e, datePropery) <= frame.toDate); [Projectable] public static IEnumerable ApplyDateOnlyFrameE(this ICollection query, Func dateAcessor, DateOnlyFrame frame) => query.Where(e => dateAcessor(e) >= frame.fromDate && dateAcessor(e) <= frame.toDate);