bernie2436
bernie2436

Reputation: 23921

will my VB code wait for a linq-to-sql stored procedure to finish?

I have VB code that calls a complex stored procedure via linq-to-sql. Will the VB code wait for the SP to finish before continuing? Or will it just make a call to the server to execute the SP (and then proceed regardless of how long it takes the SP to execute)?

Line 1 Do something
Line 2 myLinqToSQLDb.doStoredProcedure //will the code wait for this to finish before doing line 3?
Line 3 Do something else 

Upvotes: 0

Views: 349

Answers (1)

driis
driis

Reputation: 164341

It will process the lines in sequence, waiting for operations to complete, unless you use any of the asynchronous APIs.

If you don't know whether your API is asynchronous, it is probably not. It would be named BeginFoo and return IAsyncResult, or perhaps returning a Task and using Async / Await from the newest VB version).

Upvotes: 5

Related Questions