O'Reilly logo

Multithreading in C# 5.0 Cookbook by Eugene Agafonov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with a database asynchronously

This recipe walks us through the process of creating a database, populating it with data, and reading data asynchronously.

Getting ready

To step through this recipe, you will need a running Visual Studio 2012. No other prerequisites are required. The source code for this recipe can be found at BookSamples\Chapter9\Recipe3.

How to do it...

To understand the process of creating a database, populating it with data, and reading data asynchronously, perform the following steps:

  1. Start Visual Studio 2012. Create a new C# Console Application project.
  2. In the Program.cs file add the following using directives:
    using System; using System.Data; using System.Data.SqlClient; using System.IO; using System.Reflection; using System.Threading.Tasks; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required