private async Task <bool> IsNewVacationConflicting(DateTime start, DateTime end) { List <VacationViewModel> vacations = await vacationRepository.GetNotRejectedUserVacation(GetLoggedUserId()); foreach (VacationViewModel vac in vacations) { if (vac.StartDate <= end && start <= vac.EndDate) // detect conflict in requested vacation and existing ones { return(true); } } return(false); }