EngineeringSenior DeveloperTraining Sessions

Session 02 - Dependency Injection: Hiểu Đúng, Dùng Đúng

Premium

Hầu hết .NET dev đều biết add service vào DI container. Nhưng rất ít người thực sự hiểu: lifetime nghĩa là gì trong runtime, captive dependency là gì, và khi nào DI container lại trở thành vấn đề.


Mục tiêu

  • Hiểu bản chất DI (không phải chỉ cú pháp)
  • Nắm vững lifetime: Transient, Scoped, Singleton - thực sự hoạt động thế nào
  • Phát hiện Captive Dependency bug (nguy hiểm, khó debug)
  • Biết khi nào DI là overkill
  • Anti-patterns cần tránh

1) DI là gì - Bản chất 30 giây

DI KHÔNG phải .NET feature. DI là design principle:
Premium

Continue with premium access

Session 02 - Dependency Injection: Hiểu Đúng, Dùng Đúng is part of the premium library. Sign in with a premium account to unlock the full lesson and the rest of this track.

01 Full premium lesson access
02 Deeper implementation notes
03 Ongoing content updates