Linq Select Into using T-SQL Function -


i have following t-sql working :

select * #visibletasks [#alltasks]   [dbo].[func_gettaskvisibility](taskid, state) = 1 

i pass in temp table 100's of tasks , run function func_gettaskvisibility against tasks.

the function checks against several requirements , each #alltask returns 1 , 0 bad.

i collected return = 1 , place new temp table called #visibletasks.

how can same call within linq?

non working code

 var visible = ( f in alltasks      select new {      // lookup foreach , return clean      visibletasks = func_gettaskvisibility(taskid,state) = 1     }     ).tolist(); 

well, select into used insert data, linq not designed for, query part be:

 var visible = ( f in alltasks      // lookup foreach , return clean      func_gettaskvisibility(taskid,state) = 1     select f     ).tolist(); 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -