|
|
|
@ -15,8 +15,11 @@ public class CheckForOverlappingPlayoutItemsHandler(
@@ -15,8 +15,11 @@ public class CheckForOverlappingPlayoutItemsHandler(
|
|
|
|
|
|
|
|
|
|
bool hasConflict = await dbContext.PlayoutItems |
|
|
|
|
.Where(pi => pi.PlayoutId == request.PlayoutId) |
|
|
|
|
.AnyAsync(a => dbContext.PlayoutItems |
|
|
|
|
.Any(b => |
|
|
|
|
.AnyAsync( |
|
|
|
|
a => dbContext.PlayoutItems |
|
|
|
|
.Where(b => b.PlayoutId == a.PlayoutId) |
|
|
|
|
.Any( |
|
|
|
|
b => |
|
|
|
|
a.Id < b.Id && |
|
|
|
|
a.Start < b.Finish && |
|
|
|
|
a.Finish > b.Start), |
|
|
|
|