public ConflictCheck(ICalendarEventRepository <CalendarEvent> repository , [Optional] IOverlappingCheck olc) { _events = repository.GetAll(); // The idea is that, there will be many rule checks (my previous projects have over 30 rules) as well as many events (aka 1000+), so we do not want to connect to database multiple times IConflictCheck handler = BuildCheckChain(olc); handler.SetNext(new NullCheck()); // Null check always the last one _chain = new ConflictCheckChain(handler); }
public IList <CalendarEvent> GetAll() { return(_calendarEventRepository.GetAll()); }
public IActionResult Get() { return(Ok(_calendarRepository.GetAll())); }