c# - How can I iterate through a multi lined textbox and asynchronously run LINQ SQL queries for each line? -


basically, want do. imagine textbox with:

computer1 computer2 computer3 

i want put these multi-lined textbox on asp .net page, , have iterate through these objects , run linq-sql query on each one. basically, linq-sql query return pc's software installed (this might end in excel spreadsheet can work once have data back).

my challenge this: want run query asynchronously, , update user after each computer has had linq-sql query run against (something checking computer2... checking computer 3...). query pretty complex, , @ end has "add up" machines data , put datatable exporting.

the main thing has got me stumped async linq sql, , how update user computer "currently" on.

any awesome :)

executing each of sql query lines, expecting results stream finish execution. classic http communication not sutied type of process (although possible of course).

i go way:
- create signalr server
- post sql line server , "job id"
- on client listen signalr callbacks server push "job id" , results associated job.
- more jobs results pushed server update ui progress, outstanding jobs etc.

note can post query lines using signalr , unifying programming model.

on server, once "job" has been submitted, want spin task handle query execution. if want jobs executed in order , serially, use queue of sort.

also note order in responses streamed client not guaranteed (when executing in parallel) since first job may run longer second job example.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -