c# - Stored procedure times out in DBML, but is otherwise instant -


i've written simple stored procedure in sql server 2008 r2, executes instantly, when testing in ssms. however, when map linq2sql (dbml) , execute there, times out reason.

i haven't slightest begin on this...

edit: else works (general linq2sql other sprocs). sproc mentioned below newly added dbml.

sproc:

select top 50 p.id, t1.name p inner join t1 on p.id = t1.id (p.id <> @id) , (p.id2 = @id2) , t1.name in (     select name t1     id = @id ) 

c#:

    int id1,id2;     using (var db = new datacontext())     {         foreach (var item in db.sproc(id1, id2)) // timeout exception here!         {             // code...         }     } 

edit #2: i've altered sproc same exact code, , works. i'm not sure problem, i'm assuming wasn't sql server's fault.


Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

How to mention the localhost in android -

php - Calling a template part from a post -