C# Mastery Hub
Home
Challenges
Discussion
Lessons
Core Topics
C# Fundamentals
Console Applications
Classes & OOP
Windows Forms
ASP.NET Core
SQL Server
VS & SQL Connection
RDLC Reports
.NET MAUI
Getting Started
Getting Started
Website Development
SEO Guide
Security
Project Workflow
Extra Topics
Cloud & Deployment
AWS Cloud
Deployment
About
Contact
Test Your Knowledge
VS + SQL - Lesson 2: ADO.NET Basics Quiz
Answer all questions to test your understanding
1
Which NuGet package is needed for SQL Server connections in modern .NET?
System.Data.SqlClient
Microsoft.Data.SqlClient
Microsoft.SqlServer
System.SqlServer
2
What is the purpose of SqlCommand in ADO.NET?
To connect to the database
To execute SQL commands
To read data from the database
To store data
3
What does 'using' do with SqlConnection?
Makes the connection faster
Automatically closes and disposes the connection
Creates multiple connections
Encrypts the connection
4
What method reads data from a SqlCommand?
ExecuteReader()
ReadData()
GetData()
FetchData()
5
What is SqlParameter used for?
To store configuration values
To safely pass values to SQL commands
To create database tables
To read data from tables
Submit Quiz