Read the app settings with ASP.NET Core

In previous version of “ASP.NET”, we used to retrieve settings from the “web.config” by using the “ConfigurationManager” like this: View the code on Gist. However, with “ASP.NET Core”, things get a little bit different, and I didn’t say “more complicated” but “different”. Indeed, now, the idea is to convert your app settings to a plain […]

Create objects on the stack using stackalloc

Imagine we want to create a method that generates an array composed by square values of its indexes and the only parameter we want to pass to this method is the size of the array. A straight-forward approach would be this: View the code on Gist. We could have displayed the values of the array […]

Dapper, a real alternative to Entity Framework

So you have a great idea for web application and you decided to use “ASP.NET” (Core I hope 😉 ). Now, you’re wondering how you will handle the communication between your application and your database. There are of course a lot of possibility for you: Hard code SQL queries using standard BCL (“SqlCommand”, “SqlDataAdapter”). Mini […]