From 7be66c3e875fc658bf46ca4e33afa5163036cf66 Mon Sep 17 00:00:00 2001 From: Akash Kava <39438041+ackava@users.noreply.github.com> Date: Fri, 6 Jan 2023 15:31:08 +0530 Subject: [PATCH] Added DateRange events --- NeuroSpeech.EntityAccessControl/DbContextEvents.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/NeuroSpeech.EntityAccessControl/DbContextEvents.cs b/NeuroSpeech.EntityAccessControl/DbContextEvents.cs index f4303b0..e7a57ce 100644 --- a/NeuroSpeech.EntityAccessControl/DbContextEvents.cs +++ b/NeuroSpeech.EntityAccessControl/DbContextEvents.cs @@ -14,6 +14,11 @@ public class DbContextEvents private readonly Dictionary registrations = new(); + public DbContextEvents() + { + Register(); + } + internal abstract class EntityHandler { public abstract Task Run(DbContext db, object entity); @@ -61,4 +66,12 @@ public void Register() registrations[et] = t; } } + + internal class DateRangeEvents: DbEntityEvents + { + public override IQueryable Filter(IQueryable q) + { + return q; + } + } }