EF Core Relationships Made Simple: Primary Keys, Foreign Keys, and Navigation Properties

Database relationships sounded much more complicated to me when people started throwing around terms like: primary key foreign key navigation property one-to-many many-to-many But the basic idea is something we…

Continue ReadingEF Core Relationships Made Simple: Primary Keys, Foreign Keys, and Navigation Properties

async and await in ASP.NET Core: The Explanation I Needed as a C# Developer

For a long time, I understood the basic rule: If a method uses await, it usually needs async. Example: public async Task<IActionResult> Index() { var accounts = await _context.Accounts.ToListAsync(); return…

Continue Readingasync and await in ASP.NET Core: The Explanation I Needed as a C# Developer

LINQ Finally Made Sense to Me When I Stopped Treating It Like Weird C# Syntax

LINQ is one of those C# features that can look strange when you first see it. Something like this: var transactions = await _context.Transactions .Where(t => t.Amount > 100) .OrderByDescending(t…

Continue ReadingLINQ Finally Made Sense to Me When I Stopped Treating It Like Weird C# Syntax