Skip to main content

383 posts tagged with ".NET"

.NET Framework and Core for Application Development

View All Tags

How to Run Code Only in Development in ASP.NET Core

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

Some code belongs only on a developer's machine: an in-memory store, a relaxed setting, a debugging aid. ASP.NET Core knows which environment it runs in, and one if around builder.Environment.IsDevelopment() keeps that code out of everywhere else. This guide shows the check, where to put it, and how to try the other branch on your own machine.

Fixed: "Agent Isolation Key Is Required but Was Not Provided by the Configured AgentIsolationKeyProvider"

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

I gave a Microsoft Agent Framework agent a session store so it would remember conversations, and every request started failing with a 500: Agent isolation key is required but was not provided by the configured AgentIsolationKeyProvider. I had configured no provider at all. The default store wanted to know who was calling, and my API had no way to tell it.

Fixed: dotnet build Shows the Old "0 Warning(s) 0 Error(s)" Output Instead of Terminal Logger

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

dotnet build normally ends with a compact Build succeeded in 0.9s. In one terminal it printed the old format instead — Build succeeded., 0 Warning(s), 0 Error(s), Time Elapsed. The build was fine. The display wasn't what I expected, because on macOS and Linux .NET decides how to draw its output from the TERM environment variable, and mine was empty.

Deploy a .NET App to Azure Container Apps — Part 4: Push Your Image to the Registry

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

This is the shortest part of the series and the one most likely to save you an afternoon. Pushing an image is three commands — but if you're on an Apple Silicon Mac, one missing flag produces a container that builds perfectly, pushes perfectly, and then refuses to start on Azure.

Join Two Entities in .NET Core Using Lambda and Entity Framework Core

· 11 min read
Jagdish Kumawat
Founder @ Dewiride

Entity Framework Core maps each database table to an entity class and gives you a DbContext to query them. Most of the time you read from a single DbSet, but sooner or later you need data that lives across two tables — exactly what a SQL JOIN gives you. In EF Core, the lambda-based Join() method does the same job, and it translates into real SQL that runs on the database server.

Everything below targets .NET 10 and EF Core 10, the current Long Term Support releases.