Use ASP.NET Core route-to-code for simple JSON APIs
In this post, we explore how you can use route-to-code instead of controllers, and the benefits and drawbacks.
When you need to write an API in ASP.NET Core, you’ve traditionally been forced to use ASP.NET Core MVC. While it’s very mature and full-featured, it also runs against the core principles of ASP.NET Core—it’s not lightweight or as efficient as other ASP.NET Core offerings. As a result you’re saddled... [Read More]
The .NET Stacks #27: Giving some 💜 to under-the-radar ASP.NET Core 5 features
This week, we look at some under-the-radar ASP.NET Core 5 features, and look around the community.
Use Azure Functions, Azure Storage blobs, and Cosmos DB to copy images from public URLs
In this post, we work with Azure Storage blobs and Cosmos DB to copy images that are available over the public Internet.
There are several reasons why you’ll want to host publicly accessible images yourself. For example, you may want to compress them or apply metadata for querying purposes on your site. For my Blast Off with Blazor project, I had that exact need. [Read More]
Blast Off with Blazor: Isolate and test your service dependencies
In this post, we refactor our component to inject an API service wrapper, to abstract away a direct HttpClient dependency.
So far in our series, we’ve walked through the intro, wrote our first component, and dynamically updated the HTML head from a component. [Read More]
The .NET Stacks #26: .NET 5 has arrived, let's party
This week, we look at the .NET Conf content and also discuss the buzz around dependency injection.
Simplify your ASP.NET Core API models with C# 9 records
In this post, a quick tip about how to use records to simplify your API models.
Out of all the new capabilities C# 9 brings, records are my favorite. With positional syntax, they are immutable by default, which makes working with data classes a snap. I love the possibility of maintaining mutable state in C# where appropriate, like for business logic, and maintaining immutability (and data... [Read More]
Use OpenAPI, Swagger UI, and HttpRepl in ASP.NET Core 5 to supercharge your API development
In the latest post, we look at how easy it is to work with Swagger and HttpRepl in ASP.NET Core 5.
When developing APIs in ASP.NET Core, you’ve got many tools at your disposal. Long gone are the days when you run your app from Visual Studio and call your localhost endpoint in your browser. [Read More]
The .NET Stacks #25: .NET 5 officially launches tomorrow
This week, .NET 5 ships and are C# 9 records actually immutable by default?
Blast Off with Blazor: Use .NET 5 to update the HTML head from a Blazor component
In the latest post, we'll learn how to update the HTML head dynamically using .NET 5.
So far in this series, we’ve walked through a project intro and also got our feet wet with our first component. [Read More]