public bool GetWorkShiftsByWorkerId(int WorkerId) { var uncompletedShifts = uOW.WorkshiftHistoryRepo.Get(s => s.WorkEnded == null & s.WorkStarted != null & s.DriverId == WorkerId).Any(); if (uncompletedShifts) { return true; } else { return false; } }