I've seen two ways to inject dependency with Unity.
With Constructor :
private readonly IDummyService _dummyService;
public AuthController(IDummyService dummyService)
{
this._dummyService = dummyService;
}
With Attribute :
[Dependency]
public IDummyService _dummyService { get; set; }
public AuthController()
{
}
What is the difference between these two approaches? and which one is better to use?