NSubstitute is a great framework for mocking objects for tests. I recently had an unexpected behaviour when stubbing a method call. For this simple example we »
In previous versions of .Net the standard was to have a startup.cs file which implemented two methods:
* ConfigureServices: Which is responsible for configuring dependency injection. »
You are likely looking for one of these two examples (using hours):
var dateTimeMinusOneHour = DateTime.Now.Subtract(TimeSpan.FromHours(1));
var dateTimeMinusOneHour = DateTime.Now.AddHours(-1) »
C# has great built-in support for making HTTP requests using the HttpClient. Using this client you can Put, Post, Get, Delete and much more using your »
Dapper is a micro ORM or a simple object mapper and it integrates smoothly with C# and its SqlConnection. The same applies to Dapper and transactions »