Test Your Knowledge

VS & SQL Connection Quiz

Answer all questions to test your understanding

1 What is a connection string used for?
2 What authentication method uses your Windows credentials?
3 Where should you store connection strings in an ASP.NET Core app?
4 What is the correct syntax for a SQL Server connection string?
5 How do you read a connection string from appsettings.json in C#?
6 Which NuGet package is needed for SQL Server connections in modern .NET?
7 What is the purpose of SqlCommand in ADO.NET?
8 What does 'using' do with SqlConnection?
9 What method reads data from a SqlCommand?
10 What is SqlParameter used for?
11 Which method executes a command that doesn't return any rows?
12 What is the biggest risk of using string concatenation in SQL queries?
13 What is the correct way to pass values to a SQL command?
14 What does ExecuteNonQuery() return?
15 Which of these is a safe SQL command?
16 What is the main characteristic of SqlDataReader?
17 What is the main characteristic of SqlDataAdapter?
18 Which one is better for binding to a Windows Forms DataGridView?
19 Which one is more memory efficient for reading large datasets?
20 What method fills a DataTable using SqlDataAdapter?
21 What does EF Core stand for?
22 What is an ORM?
23 What does DbSet represent in EF Core?
24 What method saves changes to the database in EF Core?
25 What is the advantage of EF Core over ADO.NET?
26 How do you read data in EF Core?
27 Which method adds a new entity to the database in EF Core?