0
可能性の重複:コンストラクタインジェクションよりプロパティインジェクションの利点はありますか?
対public class LoginController : Controller { [Inject] public ICookiesManager CookiesManager {get; set;} [Inject] public ISecurityManager SecurityManager {get; set;} public LoginController() { } }
:
Dependency injection through constructors or property setters?
プロパティインジェクションがコンストラクタ・インジェクション以上の任意の利点を持っている場合、私は骨董よ
はい、プロパティインジェクションでは、これは同時にプロパティインジェクションの欠点になる可能性があります。私は利点を探しています:) – Ruslan