I'm very new to Workflow and a dummy in VB, so, I'm sorry for my weak question if it is.
I'm trying to implement a using block like this:
using (var db = new Dal.DataContextProxy())
{
//My Codes
}
In a sequence, I want to initiate db in a using block. How should I do that? I tried Assign, but it seems I can not use Using Block in it.
Thank you.
You can't do with the standard activities but creating a using activity that exposes the db to it's children isn't hard. Make sure you think about workflow persistence as you probably couldn't persist and reload the workflow state in the middle of a block that has a SqlConnection open.