async await - When to use TaskFactory in Asp.Net Web applications (webform or mvc)? -
I am now working in WPF ... here we are background_worker, taskfactory Start using new functions and async / wait.
In the web app, I know that we have AJX, MVC partial view etc.
My question is do we actually use the above async methods (work, sync / wait) in the web app? If we use, can you give me some examples?
I have a document generation module in my web app in which I have to get data from DB and make documents out of it. Is this a good scenario for async calls? (Call and throw and call the function and never pay attention to it).
I am now working in WPF ... here we are background_workers, taskfactor . Start using new functions and ASC / wait.
You should actually use the task. Code> Background Worker and Work.Feature. Start New . Tasks Turn on better than StartNew , and is more composited and type-safe than BackgroundWorker .
My question is, do we really use the above async methods (work, sync / wait) in the web app?
On ASP.NET, you should never use your own background thread ( backgroundworker , StartNew , Task. Cancel ). However, you can of course use async and waiting .
If we use, can you give me some examples? I have a document generation module in my web app in which I have to get data from DB and make documents.
Yes, I / O-based operation is an example. So there is a "write" document - whether upload to cloud storage or local file system.
I have a async ASP.net that you can find useful.
Comments
Post a Comment