I'm wondering if anyone can help me? I'm trying to prevent events from overlapping in a room booking system. Each event has a start date/time and an end date/time. What I want to happen is if a user tries to book an event between times that already exist for an event it should error.
So for example the following should error as they overlap:-
Event 1:
- Start Date/Time: 10/08/2012 09:00
- End Date/Time: 10/08/2012 11:00
Event 2:
- Start Date/Time: 10/08/2012 10:00
- End Date/Time: 10/08/2012 12:00
I'm using MVC and Entity Framework, so a Linq solution would be preferable.
Any help would be much appreciated :)