I am migrating a WebAPI project with .NET Framework 4.6 for .NET Core.
In my project I use Unity to do Dependency Injection:
var container = new UnityContainer();
DependencyResolver = new UnityDependencyResolver(container);
container.RegisterType<IUserService, UserService>();
In the .NET Core I was not able to use Unity the same way I did in .NET 4.6 and found a solution to use that way by putting it in my Startup.cs
// DI Containers Registration
services.AddTransient<IUserService, UserService>();
What would be the best practice today in .NET Core for Dependency Injection, it's worth using some component like StructureMap, CastleWindsor.