Wednesday, 13 January 2021

EF Core In-Memory Database

Writing a mock repository for unit testing can require a large amount of coding that simply duplicates the features of a real database. Nowadays, the Entity Framework Core In-Memory database does the work for you.

Topics include:

  • .NET Core
  • Entity Framework Core
  • Unit testing
  • Test Driven Development
  • Mocking
  • In-memory databases

Units

 

Ever called a function passing seconds instead of milliseconds? Or metres instead of feet? Here's a robust way to avoid problems with units.

Topics include:

  • C++
  • C++ 11/14
  • Time
  • Units
  • Type safety
Source code available at: https://github.com/JasperKent/Units

ASP.NET Core Pipeline Events

 

The pipeline works very differently in ASP.NET Core from ASP.NET Framework. Here we examine one aspect of the differences.

Topics include:
  • C#
  • ASP.NET Core
  • Middleware
  • Authorization
  • Authentication

JavaScript Async and Await

Once you've got to grips with JavaScript promises, you can make your code much more legible using the keywords async and await.

Topics include:
  • JavaScript
  • async
  • await
  • Promises
  • Ajax
  • Web Services
Related videos:

Promises, Promises

Promises are becoming ever more popular in JavaScript, but it's not always obvious what the benefits are. Here a simple caching example explains the essentials.

Topics include:

  • JavaScript
  • Promises
  • Ajax
  • Web Services
Related videos:

Dynamic Overloading

 

The dynamic keyword allows decisions about object type to be deferred until runtime. One benefit of this is that we can make method overloading decisions at runtime rather than having them locked in by the compiler.

Topics include:

  • C#
  • dynamic
  • Polymorphism
  • Overloading
  • Strong typing

IEnumerable vs IQueryable

 

The two interfaces IQueryable and IEnumerable seem almost interchangeable. Here I discuss one of the key differences, and how it can have a serious effect on performance.

Topics include:

  • C#
  • IQueryable<T>
  • IEnumerable<T>
  • Extension methods
  • Entity Framework
  • SQL
  • Performance
  • Deferred execution
Related videos:

The State Pattern

  How many developers does it take to change a lightbulb? With the State pattern, not very many. Topics include: The State Pattern Design Pa...