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 Visual Studio 2015. 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:
- Start Visual Studio 2015. Create a new C# console application project.
- In the
Program.cs
file, add the followingusing
directives:using System; using System.Data; using System.Data.SqlClient; using System.IO; using System.Reflection; using System.Threading.Tasks; ...
Get Multithreading with C# Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.