I'm implementing dependency injection in my project. I've come across two ways to add a singleton service -
services.AddSingleton(new MyCustomService())
and
services.AddSingleton<MyCustomService>()
Both methods seem to work. What's the difference between these two methods, and which one should I be using?