1 year ago • Rise Academy Career Connect

🚀 ASP.NET Core Service Lifetimes Simplified

Choosing the right service lifetime is critical in ASP.NET Core to avoid data leaks, performance issues, or inconsistent behavior.
In this presentation, I’ve explained:
✅ When to use Scoped services (with ShoppingCart example)
✅ Why Transient is best for stateless helpers (with RandomNumber & PasswordHasher examples)
✅ The problems caused if you pick the wrong lifetime

Check out the slides to strengthen your interview prep & project decisions!

#ASPNETCore #DotNet #CSharp #Developers #Learning

1 year ago • Rise Academy Career Connect

ASP.NET Core Interview question challenge #1 
 Context:

You're building a backend for an e-commerce platform using ASP.NET Core. Each user interacts with their shopping cart via HTTP requests — adding items, removing items, and viewing the cart. The cart data is stored in a distributed cache (like Redis) and synced with a database periodically.
You’ve created a service called ICartService that:
- Retrieves the cart for the current user
- Updates cart items
- Calculates totals and applies discounts
This service depends on:
- IUserContextService to get the current user ID from the request
- ICartRepository to interact with cache and DB


Question:
Which service lifetime should you use for ICartService in this scenario?
Options:

Singleton

Scoped

Transient

Static

3 votes

1 year ago • Rise Academy Career Connect

QA / Software Testing jobs 
QA-Consultant-Staff https://lnkd.in/g_ns_Pwf

QA - Automation with BDD, Selenium, Java https://lnkd.in/g8-8GuGp
Senior Automation Tester - JavaScript https://lnkd.in/gGsRh9Wg
Software Dev Engineer, Test https://lnkd.in/gzwcGeGb
Quality Automation Specialist https://lnkd.in/gh6ig-VK
IT Software Engineer – QA Testing https://lnkd.in/gnYQ6AKt
Monitoring & Testing Specialist 5 - C05 https://lnkd.in/grcNtfx9
Automation Tester https://lnkd.in/geMX3JDb
Selenium Automation Testing https://lnkd.in/gMYfZU6k
Senior Automation Specialist - Java, Selenium, TestNG Framework (Hybrid), and BDD https://lnkd.in/ga-6AZZ4
ETL Tester https://lnkd.in/gQAGUEsp 
API Testing, Java, Rest Assured, Selenium, Cucumber - Automation tester https://lnkd.in/gqPnjbFQ