ANKO Code Academy
AI-Native Coding Learning Platform
Courses
Labs
Discussions
12 min
presentation
Service Lifetimes
Service Lifetimes
0 / 10 completed
1
The Three Lifetimes
2
Transient Services
3
Scoped Services
4
Singleton Services
5
Lifetime Compatibility Rules
6
Detecting Captive Dependencies
7
Visualizing Lifetimes
8
Common Mistakes
9
Choosing the Right Lifetime
10
Key Takeaways
The Three Lifetimes
Lifetime
Instance Per
Use Case
Transient
Every request
Lightweight, stateless services
Scoped
HTTP request
Database contexts, unit of work
Singleton
Application
Caching, configuration
Skip
Previous
Step 1 of 10
Next
← → Navigate
Space: Skip / Next
Enter: Next
Previous
Next