TCS Angular + .NET Interview Questions for 6+ years
Shared question set for 6+ years of experience. Topics and wording follow the supplied notes; these are questions, not official company guidance.
- Explain the complete flow of your application from Angular to ASP.NET Core API to Business Layer to Database.
- How would you design a scalable ASP.NET Core Web API? You have Transient, Scoped and Singleton services. How do you decide which lifetime to use?
- Explain how the ASP.NET Core middleware pipeline works. Why does middleware order matter?
- How would you implement global exception handling and logging in a production API?
- How would you secure an ASP.NET Core Web API using JWT?
- What is the difference between IEnumerable<T> and IQueryable<T>? When would you use each?
- What is the difference between FirstOrDefault() and SingleOrDefault()?
- What is deferred execution in LINQ?
- Your EF Core query is taking several seconds on a large table. How would you investigate and optimize it?
- What is the N+1 query problem in EF Core? How would you avoid it?
- When would you use Include() and when would you use projection?
- What is change tracking in EF Core? When would you use AsNoTracking()?
- Why would you use the Repository Pattern? Do you always need it with EF Core?
- Explain the difference between clustered and non-clustered indexes. How can indexing improve or hurt performance?
- What are CTEs and window functions? Where have you used them?
- A SQL query works fine with 1,000 records but becomes very slow with millions of records. What would you check?
- An API returns thousands of employee records. How would you display them efficiently in Angular?
- Your Angular application is making the same API request multiple times. How would you avoid duplicate calls?
- When would you use switchMap, concatMap and mergeMap?
- How would you prevent memory leaks from Angular subscriptions?
- Explain Default vs OnPush change detection. When would you use OnPush?
- How would you implement authentication and role-based authorization across both Angular and ASP.NET Core?
- The API works in Postman but fails from Angular. What would you check?
- Your Angular UI is completed, but the backend API isn't ready yet. How would you continue development and test the UI?
- How would you implement caching? What would you cache on the Angular side versus the API side?
- Explain how your application goes from a code commit to Production. What happens in your CI/CD pipeline?