Migrating to .NET Core
So in a hunt for productivity as my latest side project hit a dead end, I embarked on a herculean task and do the impossible: migrate our in-house .NET Framework to .NET Core.
I held this off for for a number of reasons. First, when I initially checked .NET Core—circa 2017—it was pretty raw. Most of the libraries we depend on do not have a corresponding package. Even some of the built-in language features weren’t there yet (async
was supported in 2.0). Second, we would make significant savings in our future projects with Linux and MySQL. Third, we can finally ditch Windows for development. Don’t get me wrong, I don’t dislike using Windows for development. However, since we are using Macs as our development machines, using VM is just a pain. Lastly, and the biggest reason of all, I just didn’t have the time.
So now that I have all the time in the world, I decided that the best way to solve a big problem is to break it into smaller pieces. Which are:
- Implement a Repository with Unit of Work pattern in EF Core as a data layer
- Migrate the base classes (for HTTP operations, IO operations, Notifications, etc.)
- Use an IoC container
- Use MySQL (or PostgreSQL) as a replacement for SQL Server *gulp*
I will share my experience for each of these tasks. Wish me luck.