In the previous section, you saw an imaginary scenario and went through an SQL injection in action. Let’s look at an actual example by creating a RESTful product API using ASP.NET Core 2.0. Before you start building this application, bear in mind the following prerequisites for this application:
- Visual Studio 2017 update 3 or later
- ASP.NET Core 2.0 or later
- C#7.0 or later
- Microsoft Entity Framework Core 2.0.0
Go through the following steps to create our application:
- Open Visual Studio.
- Select File | New | Project or press Ctrl + Shift + F5.
- Select ASP.NET Core Web Application.
- From the template window, select ASP.NET Core API. Make sure you select .NET Core 2.0.
- Name the project, choose the path for the solution, ...