This post looks at the GetService() and GetRequiredService() methods of the ASP.NET Core DI container, the difference between them and which you should use