.NET

C#, dotNet Core, ASP.NET, Entity Framework, testing, architecture, and everything .NET developers need.

Awaiting Tasks and Methods

Wait for things to finish, the async way

C# uses Task and async/await to run code asynchronously (in the background). πŸƒβ€β™‚οΈ Awaiting a Task 1 2 3 4 5 async Task RunAsync() { await Task.Delay(1000); // Wait 1 second Console.WriteL...

Introduction to Entity Framework

Easier database access with EF Core

Entity Framework Core (EF Core) is a modern ORM for C#. It lets you use C# classes to interact with your database: no raw SQL needed for most tasks! πŸš€ Why Use EF Core? Write less data access c...

Introduction to Async Programming

Make your programs faster and more responsive

Async programming lets your program do more than one thing at once: great for web requests, file I/O, and keeping apps fast. 🚦 Why Use Async? Don’t block the program while waiting for slow thi...

Executing SQL Commands: SELECT, INSERT, UPDATE, DELETE

CRUD operations with ADO.NET

ADO.NET lets you run any SQL against your database. Here’s how to do basic CRUD (Create, Read, Update, Delete). πŸ” SELECT (Read Data) 1 2 3 4 5 6 7 string sql = "SELECT Id, Name FROM Users"; using...

Connecting to SQL Server and Oracle

ADO.NET connections for major databases

ADO.NET supports many relational databases, including SQL Server and Oracle. πŸ—„οΈ SQL Server Connection Namespace: System.Data.SqlClient NuGet: Usually built-in 1 2 3 4 5 6 string connString...

LINQ with Objects

Query your own custom classes

You can use LINQ on any collection, including lists of your own classes. 🏫 Example: Students 1 2 3 4 5 6 7 8 9 10 11 class Student { public string Name; public int Age; } var students = n...

Aggregation and Grouping with LINQ

Summarize and organize your data

LINQ can do more than filter and sort: it can summarize and group your data. βž• Aggregation: Sum, Count, Average, Min, Max 1 2 3 4 5 6 int[] numbers = { 1, 2, 3, 4, 5 }; int sum = numbers.Sum(); ...

Filtering, Ordering, and Projecting with LINQ

Get what you want from your data

LINQ makes it easy to select, sort, and shape your data. πŸ”Ž Filtering with Where 1 var even = numbers.Where(n => n % 2 == 0); πŸ—‚οΈ Ordering with OrderBy / OrderByDescending 1 2 var sorted = na...

Introduction to LINQ

Query data easily in C#

LINQ (Language Integrated Query) lets you work with data (like arrays and lists) using simple, readable queries. πŸ“ Why Use LINQ? Write less code to filter, sort, and search data. Works with ...

Working with Databases Using ADO.NET

Connect your C# app to SQL Server

ADO.NET is the standard way to connect your C# applications to relational databases like SQL Server. πŸ”Œ Connecting to SQL Server You’ll need a connection string (ask your DBA or use SQL Server Exp...