I am implementing task based async pattern for wcf. The method includes stored procedure execution and lots of processing on the data it got. As well it throws an exception
the question is
how to implement that
option 1.
*await command.ExecuteScalarAsync();
//run 10000 lines of processing including exception handling*
option 2
*await command.ExecuteScalarAsync();
Task.Factory.StartNew(() => run 10000 lines of processing including exception handling);*
may be there other options...?
pros and cons of each of them
Also if I already implemented the sync for that method - should I use it?