I have the following T-SQL working :
SELECT * INTO #visibleTasks FROM [#allTasks]  
WHERE [dbo].[func_GetTaskVisibility](taskId, state) = 1
I pass in temp table with 100's of TASKS and run a Function func_GetTaskVisibility against all the TASKS.
The function then checks against several requirements and for EACH #allTask it returns a 1 for good and 0 for bad.
I collected all the return = 1 and place into a new temp table called #visibleTasks.
How can I do the same call within LINQ?
NON WORKING CODE
 var visible = ( from f in allTasks 
    select new { 
    // to lookup foreach and return clean 
    visibleTasks = func_GetTaskVisibility(taskId,state) = 1
    }
    ).ToList();
				
                        
Well,
SELECT INTOis used to insert data, which Linq is not designed for, but the query part would be: