Dependency Injection in ASP.NET Core
September 20, 2018 - Posted in Development

Intro Dependency injection is a programming technique where an object (the client) gets a dependency (i.e. a service) supplied by another object (the injector). This way the client delegates the "burden" of knowing how to implement a certain service to another class, actually decoupling itself from...

READ MORE
Website migrated to ASP.NET Core
September 11, 2018 - Posted in Development

I've just finished migrating my website from ASP.NET to ASP.NET Core. This choice was mostly driven by my personal curiosity, but in fact, .NET Core is going to be a big thing for the development future. Also, if you're a .NET developer, I believe this is going to be a mandatory path sooner or later...

READ MORE
Handle basic CRUD operations with multiple entity types in Entity Framework
April 09, 2018 - Posted in Development

Sometimes we find ourselves in the need of handling various types of objects (or entities) while using Entity Framework as ORM for our projects. The situation can be a bit more struggling when the project is not big enough to justify the use of a Repository Pattern but it's big enough to cause lots ...

READ MORE
Testing your code Part 3 - ClassData and MemberData
April 04, 2018 - Posted in Development

In the previous article we've seen how to use the [Theory] attribute with [InlineData], which allow us to have static elements to feed our tests methods. This particular approach can bring lots of noise inside our code, especially when dealing with 10 or more test methods in the same class. In this...

READ MORE
Testing your code Part 2 - Theories and InlineData
March 19, 2018 - Posted in Development

In the last article we introduced xUnit.net and talked about the very basic way to write tests with the [Fact] attribute. Today will we'll add some spicy to our tests with the [Theory] attribute. The [Theory] attribute allows you to dynamically pass a set of data to your test method and to execute ...

READ MORE
Testing your code Part 1 - Intro and Facts
March 11, 2018 - Posted in Development

In this series of tutorials I'll try to guide you through the path of Unit Testing. At the end, hopefully, we'll be able to set up one or more testing projects using xUnit.Net in order to have a good code coverage of your application. xUnit.Net (Official Website) xUnit.net is a free, open source, ...

READ MORE
How to make your web application more secure
March 04, 2018 - Posted in Development

While finalizing the new UI for my website, I decided to spend a bit of time concentrating on security, even though time's never enough. There are lots of different aspects to be taken into account when you want to develop a web application that is publicly accessible. For example: which external...

READ MORE
First Blog Post
February 13, 2018 - Posted in General

Love is like a friendship caught on fire. In the beginning a flame, very pretty, often hot and fierce but still only light and flickering. As love grows older our hearts mature and our love becomes as coals, deep burning and unquenchable.Bruce Lee I'd like to start my first blog post with a piece of...

READ MORE
Bio
Author

Hello! I'm Antonio Valentini, a .NET developer, minecraft lover and author of this blog. I hope to give you useful programming tips and to let you learn a bit more about the .NET world.