private bool HasNext(CalendarEvent current) { var nextItem = db.CalendarEvents.AsEnumerable().FirstOrDefault(i => i.CalendaryOrder > current.CalendaryOrder); return nextItem != null; }
private bool HasPrev(CalendarEvent current) { var prevItem = db.CalendarEvents.AsEnumerable().LastOrDefault(i => i.CalendaryOrder < current.CalendaryOrder); return prevItem != null; }
private CalendarEvent GetPrev(CalendarEvent current) { var prevItem = db.CalendarEvents.AsEnumerable().LastOrDefault(i => i.CalendaryOrder < current.CalendaryOrder); return prevItem; }