Skip to content
Assuming you are familiar with C#;
If I give you a Type and tell you to create an object with it, you would automatically think of Activator.CreateInstance right?
What if I tell you that instanciating a Type using Expression Trees is much faster?
The code for the benchmarks is in this repository.
Today I was installing Oh My ZSH and the theme Agnoster and it worked in the the normal terminal but not in Visual Studio Code's terminal, as it needs a monospaced font and Powerline isn't one.
In this post I'll explain how to quickly fix it.
The problem Problem VS Code defaults the terminal's font to the editor's font, and since the Agnoster theme needs Powerline, the terminal outputs non-sense characters.
Checking if a model is valid is pretty an automatic behavior at this point. Whenever a request expects a model, we need to make sure that the validation is good, and we use ModelState.IsValid for that.
But that becomes boring, most of the time (if not always) we redirect to the same page, another page or return a bad request in case of an API.
Repository Pattern was first introduced in the Domain Driven Development back in 2004 and has since then gained a lot of popularity.
Today I'll show you how you can implement a generic async version of it in C# (ASP.NET Core specifically).
The code of this blog post is available here.
I bought a laptop a long time ago but I never really used it enough to notice this.
I am now using it every day and every time a Windows 10 notification shows up, both my ears bleed (not really but you get the idea).
The volume of these notifications is EXTREMELY loud.
I was prototyping a 2D Side Scroller game in Unity a week ago and started implementing an Inventory System (Equipments, slots, etc…).
Unfortunately, Unity didn't have a Context Menu out of the box so I searched a bit and found this, which helped me get an idea of how to implement one as well as make it completely mouseless, since my game was mouseless itself.