var queryResult = from podsPref in dtPodsPrefs.AsEnumerable() where (podsPref.Field<Int32>("pref_id") == prefRow.Field<Int32>("pref_id") && podsPref.Field<String>("pod_id") == row.Field<String>("pod_id")) select podsPref; if (0 == queryResult.Count()) { if (prefRow.Field<Boolean>("is_reqd") && requestMatch == 0) skipIt = true; } else { foreach (var qRow in queryResult) { String podyesValue = qRow.Field<String>("datavalue"); if (String.IsNullOrWhiteSpace(podyesValue)) good = false;error "System.InvalidOperationException: The source contains no DataRows.\r\n at System.Data.DataTableExtensions.LoadTableFromEnumerable[T](IEnumerable`1 source, DataTable table, Nullable`1 options, FillErrorEventHandler errorHandler)\r\n at System.Data.DataTableExtensions.CopyToDataTable[T](IEnumerable`1 source)\r\n at Siriusware.Middleware.Bookings.GetPods(Dictionary`2 preferences, DateTime dateTime, ReturnType returnType, Boolean resourceOnly, String bookingIds)