Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

ASP.NET Core

ASP.NET Core MVC JSON Output in camelCase or PascalCase

You may have noticed if you have migrated from ASP.NET Web API to ASP.NET Core, that the default case for serializing output to JSON is now camelCase. If you want to see the history, you can check out this issue on the ASP.NET Core MVC GitHub. https://www.youtube.com/watch?v=FGce4oX_8q0Video can’t be loaded because JavaScript is disabled: ASP.NET Core MVC JSON Output in camelCase or PascalCase (https://www.youtube.com/watch?v=FGce4oX_8q0) Pascal Default As mentioned, the default is now camelCase.  If you need/want all of the JSON output to be in PascalCase, then the solution is pretty simple. All you need to do is specify the DefaultContractResolver.… Read More »ASP.NET Core MVC JSON Output in camelCase or PascalCase

ASP.NET Core (.csproj) Embedded Resources

I’ve previously blogged about how to have embedded resources in ASP.NET Core, however that was with the older project.json.  I figured I would show how the project.json translates to the new csproj format.  If you are using Visual Studio 2017, the process via UI should feel pretty standard. If you have any questions with this post, please let me know in the comments or on Twitter.   https://www.youtube.com/watch?v=B_DYC_w6DFMVideo can’t be loaded because JavaScript is disabled: Embedded Resources in .NET Core (2 STEPS) (https://www.youtube.com/watch?v=B_DYC_w6DFM) Visual Studio 2017 For my example, I’ve included a json file called fake.json I pulled from Mockaroo.  Here’s a… Read More »ASP.NET Core (.csproj) Embedded Resources

Self Descriptive HTTP API in ASP.NET Core: Hypermedia Clients

This post is in my Self Descriptive HTTP API in ASP.NET Core series. It demonstrates how to design an HTTP API like a regular HTML website. This specific posts covers hypermedia clients. If you’re new to this series, here are earlier posts to get up to speed: Intro Object as Resource Hypermedia Siren HATEOAS If you have any questions, please follow me on Twitter. Hypermedia Clients My perception is that most people new to hypermedia driven APIs think that consuming hypermedia happens via a magic library. Or via some code generation that ultimately gives you a client library that understands every endpoint. I’m not… Read More »Self Descriptive HTTP API in ASP.NET Core: Hypermedia Clients