Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: Historically, developers would sprinkle try-catch blocks, logging frameworks, and authorization checks directly inside controllers. This led to: Repetition Hard-to-test classes Cross-cutting concerns pollut…
Short answer: uthorization, Resource, Action, Exception, and Result filters. Real-world example (ShopNest) A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for ever…
Short answer: uthorization checks directly inside controllers. This led to: Repetition Hard-to-test classes Cross-cutting concerns polluting business logic Fragile code Filters solve these by offering centralized, consis…
Short answer: pp.UseMiddleware<YourMiddleware>(); pp.UseRouting(); pp.UseEndpoints(endpoints => { endpoints.MapControllers(); }); pp.Run(); In older versions (e.g., .NET Core 3.1), Startup.cs is used: public voi…
Short answer: var app = builder.Build(); app.UseMiddleware<YourMiddleware>(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); app.Run(); In older versions (e.g., .NET Core 3.1),…
Short answer: Filters promote reusability, separation of concerns, cleaner controllers, and easier maintenance. Real-world example (ShopNest) ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putti…
Short answer: Example – Using ServiceFilter [ServiceFilter(typeof(AuditLogFilter))] public class UserController : ControllerBase { } Real-world example (ShopNest) A ShopNest ValidateModelAttribute runs before actions and…
Short answer: uthorization Before everything Identity, JWT, RBAC Resource Before model binding Caching, request trimming ction Before/after action Logging, validation Exception On unhandled errors Global error handling R…
Short answer: Authorization Filters Resource Filters Action Filters Exception Filters Result Filters Endpoint Filters (ASP.NET Core 7+) Real-world example (ShopNest) A ShopNest ValidateModelAttribute runs before actions…
Short answer: Diagram) -------------------------- | Authorization Filter | -------------------------- -------------------------- | Resource Filter | -------------------------- -------------------------- | Model Binding H…
Short answer: wait _next(context); // Post-processing logic } } Register it: pp.UseMiddleware<MyCustomMiddleware>(); wait _next(context); // Post-processing logic } } Register it: pp.UseMiddleware<MyCustomMiddle…
Short answer: Create a class with: A constructor accepting RequestDelegate An Invoke or InvokeAsync method public class MyCustomMiddleware { private readonly RequestDelegate _next; public MyCustomMiddleware(RequestDelega…
Short answer: uthorization filters always run first. Intermediate Level Real-world example (ShopNest) A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every con…
Short answer: ADO.NET? To retrieve a single row or column of data, you can use a SqlCommand and either execute it with ExecuteScalar (for single column data) or ExecuteReader (for a single row). Using ExecuteScalar (for…
Short answer: To retrieve a single row or column of data, you can use a SqlCommand and either execute it with ExecuteScalar (for single column data) or ExecuteReader (for a single row). Explain a bit more Using ExecuteSc…
Short answer: You can fetch data from multiple tables in ADO.NET using various SQL techniques, such as JOINs (e.g., INNER JOIN, LEFT JOIN) or subqueries. Steps: Say this in the interview Define — one clear sentence (the…
Short answer: And sync with the database? To update multiple records in a DataTable and sync the changes with the database, you need to follow these steps: Real-world example (ShopNest) For large order exports, ShopNest…
Short answer: To update multiple records in a DataTable and sync the changes with the database, you need to follow these steps: Real-world example (ShopNest) For large order exports, ShopNest uses SqlDataReader (forward-…
Short answer: In an ASP.NET WebForms application, you can use the GridView control to display data from a database by following these steps: Real-world example (ShopNest) ShopNest’s reporting job still uses ADO.NET for a…
Short answer: When working with large datasets in ADO.NET, it's crucial to ensure that the application does not run into performance issues, such as excessive memory usage or long wait times. Here are some strategies to…
Short answer: Concurrency issues occur when multiple users attempt to update the same data simultaneously. There are two main strategies to handle concurrency in ADO.NET: Real-world example (ShopNest) ShopNest’s reportin…
Short answer: Data validation ensures that the data being inserted into the database is correct and consistent. You can perform validation at various stages, including the client side (e.g., using JavaScript in a web app…
Short answer: Building an AI career in 2026 requires strong fundamentals plus deployable projects. Learn core ML concepts, LLM workflows, and production practices such as evaluation and monitoring. Employers prioritize p…
Short answer: Building an AI career in 2026 requires strong fundamentals plus deployable projects. Learn core ML concepts, LLM workflows, and production practices such as evaluation and monitoring. Employers prioritize p…
Short answer: Salary negotiation works best when you combine market benchmarks with your business impact. Present a realistic range, explain your value with measurable outcomes, and stay collaborative with HR. This appro…
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Historically, developers would sprinkle try-catch blocks, logging frameworks, and authorization checks directly inside controllers. This led to: Repetition Hard-to-test classes Cross-cutting concerns polluting business logic Fragile code Filters solve these by offering centralized, consistent, and reusable implementation points.
A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: uthorization, Resource, Action, Exception, and Result filters.
A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: uthorization checks directly inside controllers. This led to: Repetition Hard-to-test classes Cross-cutting concerns polluting business logic Fragile code Filters solve these by offering centralized, consistent, and reusable implementation points.
A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: pp.UseMiddleware<YourMiddleware>(); pp.UseRouting(); pp.UseEndpoints(endpoints => { endpoints.MapControllers(); }); pp.Run(); In older versions (e.g., .NET Core 3.1), Startup.cs is used: public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { pp.UseMiddleware<YourMiddleware>(); pp.UseRouting(); pp.UseEndpoints(endpoints => {………… pp.UseMiddleware<YourMiddleware>(); pp.UseRouting();…
pp.UseEndpoints(endpoints => { endpoints.MapControllers(); }); pp.Run(); In older versions (e.g., .NET Core 3.1), Startup.cs is used: public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { pp.UseMiddleware<YourMiddleware>(); pp.UseRouting(); pp.UseEndpoints(endpoints => { endpoints.MapControllers(); }); } pp.UseMiddleware<YourMiddleware>(); pp.UseRouting(); pp.UseEndpoints(endpoints => { endpoints.MapControllers(); }); pp.Run(); In older versions (e.g., .NET Core 3.1), Startup.cs is used: public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { pp.UseMiddleware<YourMiddleware>(); pp.UseRouting();…
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: var app = builder.Build(); app.UseMiddleware<YourMiddleware>(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); app.Run(); In older versions (e.g., .NET Core 3.1), Startup.cs is used: public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseMiddleware<YourMiddleware>(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
In ASP.NET Core 6+ (minimal hosting model), middleware is added in Program.cs: var builder = WebApplication.CreateBuilder(args);
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Filters promote reusability, separation of concerns, cleaner controllers, and easier maintenance.
ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putting DbContext in a Singleton causes threading bugs.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Example – Using ServiceFilter [ServiceFilter(typeof(AuditLogFilter))] public class UserController : ControllerBase { }
A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: uthorization Before everything Identity, JWT, RBAC Resource Before model binding Caching, request trimming ction Before/after action Logging, validation Exception On unhandled errors Global error handling Result Before/after result Response wrapping, formatting Endpoint (ASP.NET Core 7+) round minimal API endpoints Logging, validation 3.1… Authorization……… Filters These execute first, determining whether the user…
can access the route. public AuditLogFilter(ILogger<AuditLogFilter> logger)
{
_logger = logger;
}
public void OnActionExecuting(ActionExecutingContext context)
{ _logger.LogInformation("Request started at: {time}", DateTime.UtcNow); }
public void OnActionExecuted(ActionExecutedContext context)
{ _logger.LogInformation("Request ended at: {time}", DateTime.UtcNow); }
} 3.4 Exception Filters Centralizing error handling is vital in fintech and healthcare APIs. Example use cases: Returning consistent error envelopes Logging unhandled exceptions Protecting internal stack traces 3.5 Result Filters These wrap the response. Use cases: Response compression Standardizing API responses Masking sensitive data 3.6 Endpoint Filters (ASP.NET Core 7+) Primarily for minimal APIs. Example use cases: Request validation Logging Caching Response transformation pp.MapGet("/users/{id}", (int id) => GetUser(id)) .AddEndpointFilter(new LoggingEndpointFilter());
A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Authorization Filters Resource Filters Action Filters Exception Filters Result Filters Endpoint Filters (ASP.NET Core 7+)
A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Diagram) -------------------------- | Authorization Filter | -------------------------- -------------------------- | Resource Filter | -------------------------- -------------------------- | Model Binding Happens | -------------------------- -------------------------- | Action Filter | -------------------------- -------------------------- | Action Method | -------------------------- -------------------------- |…
Result Filter | -------------------------- -------------------------- | Response Returned | --------------------------
ShopNest pipeline order matters: exception handling → HTTPS → auth → authorization → endpoints. Auth must run before protected APIs.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: wait _next(context); // Post-processing logic } } Register it: pp.UseMiddleware<MyCustomMiddleware>(); wait _next(context); // Post-processing logic } } Register it: pp.UseMiddleware<MyCustomMiddleware>(); wait _next(context); // Post-processing logic } } Register it: pp.UseMiddleware<MyCustomMiddleware>(); wait _next(context); // Post-processing logic } }… Register it: pp.UseMiddleware<MyCustomMiddleware>();
ShopNest pipeline order matters: exception handling → HTTPS → auth → authorization → endpoints. Auth must run before protected APIs.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Create a class with: A constructor accepting RequestDelegate An Invoke or InvokeAsync method public class MyCustomMiddleware { private readonly RequestDelegate _next; public MyCustomMiddleware(RequestDelegate next) => _next = next; public async Task InvokeAsync(HttpContext context) { // Pre-processing logic await _next(context); // Post-processing logic } } Register it: app.UseMiddleware<MyCustomMiddleware>();
Create a class with: A constructor accepting RequestDelegate An Invoke or InvokeAsync method public class MyCustomMiddleware
{
private readonly RequestDelegate _next;
public MyCustomMiddleware(RequestDelegate next) => _next = next; public async Task InvokeAsync(HttpContext context)
{ // Pre-processing logic await _next(context); // Post-processing logic }
} Register it: app.UseMiddleware<MyCustomMiddleware>();
ShopNest pipeline order matters: exception handling → HTTPS → auth → authorization → endpoints. Auth must run before protected APIs.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: uthorization filters always run first. Intermediate Level
A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: ADO.NET? To retrieve a single row or column of data, you can use a SqlCommand and either execute it with ExecuteScalar (for single column data) or ExecuteReader (for a single row). Using ExecuteScalar (for a single column value, like an aggregate): SqlCommand command = new SqlCommand("SELECT CustomerName FROM Customers WHERE CustomerID =… @CustomerID",……… connection); command.Parameters.AddWithValue("@CustomerID",…
1); connection.Open(); string customerName = (string)command.ExecuteScalar(); Console.WriteLine("Customer Name: " + customerName); connection.Close(); ADO.NET?
ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: To retrieve a single row or column of data, you can use a SqlCommand and either execute it with ExecuteScalar (for single column data) or ExecuteReader (for a single row).
Using ExecuteScalar (for a single column value, like an aggregate): SqlCommand command = new SqlCommand("SELECT CustomerName FROM Customers WHERE CustomerID = @CustomerID", connection); command.Parameters.AddWithValue("@CustomerID", 1); connection.Open(); string customerName = (string)command.ExecuteScalar(); Console.WriteLine("Customer Name: " + customerName); connection.Close();
ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: You can fetch data from multiple tables in ADO.NET using various SQL techniques, such as JOINs (e.g., INNER JOIN, LEFT JOIN) or subqueries. Steps:
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: And sync with the database? To update multiple records in a DataTable and sync the changes with the database, you need to follow these steps:
For large order exports, ShopNest uses SqlDataReader (forward-only, fast). DataSet is heavier and mainly for disconnected editing scenarios.
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: To update multiple records in a DataTable and sync the changes with the database, you need to follow these steps:
For large order exports, ShopNest uses SqlDataReader (forward-only, fast). DataSet is heavier and mainly for disconnected editing scenarios.
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: In an ASP.NET WebForms application, you can use the GridView control to display data from a database by following these steps:
ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: When working with large datasets in ADO.NET, it's crucial to ensure that the application does not run into performance issues, such as excessive memory usage or long wait times. Here are some strategies to efficiently retrieve large data:
ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: Concurrency issues occur when multiple users attempt to update the same data simultaneously. There are two main strategies to handle concurrency in ADO.NET:
ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.
ADO.NET ADO.NET Core Tutorial · ADO.NET
Short answer: Data validation ensures that the data being inserted into the database is correct and consistent. You can perform validation at various stages, including the client side (e.g., using JavaScript in a web application) and server side (using ADO.NET). Steps for Server-Side Validation:
AI Career (2026) Career & HR Interview Guide · AI Career (2026)
Short answer: Building an AI career in 2026 requires strong fundamentals plus deployable projects. Learn core ML concepts, LLM workflows, and production practices such as evaluation and monitoring. Employers prioritize practical execution and portfolio depth over theory alone.
Ananya was working at Infosys and needed to handle this situation: how to become a generative ai engineer. She prepared a clear plan with timelines, ownership, and expected outcomes before speaking to HR and her manager. Vikram, who had recently moved to Freshworks, reviewed her approach and helped her tighten the messaging with measurable results. Within a few weeks, Ananya achieved a better career outcome while preserving strong professional relationships.
Ship demo projects with evaluation metrics; real evidence beats certificate-only positioning.
AI Career (2026) Career & HR Interview Guide · AI Career (2026)
Short answer: Building an AI career in 2026 requires strong fundamentals plus deployable projects. Learn core ML concepts, LLM workflows, and production practices such as evaluation and monitoring. Employers prioritize practical execution and portfolio depth over theory alone.
Meera was working at Freshworks and needed to handle this situation: how long does it take to become an ai engineer. She prepared a clear plan with timelines, ownership, and expected outcomes before speaking to HR and her manager. Rohit, who had recently moved to CRED, reviewed her approach and helped her tighten the messaging with measurable results. Within a few weeks, Meera achieved a better career outcome while preserving strong professional relationships.
Ship demo projects with evaluation metrics; real evidence beats certificate-only positioning.
AI Career (2026) Career & HR Interview Guide · AI Career (2026)
Short answer: Salary negotiation works best when you combine market benchmarks with your business impact. Present a realistic range, explain your value with measurable outcomes, and stay collaborative with HR. This approach improves your chances of a better CTC without sounding rigid.
Neha was working at CRED and needed to handle this situation: ai engineer salary in india. She prepared a clear plan with timelines, ownership, and expected outcomes before speaking to HR and her manager. Arjun, who had recently moved to Flipkart, reviewed her approach and helped her tighten the messaging with measurable results. Within a few weeks, Neha achieved a better career outcome while preserving strong professional relationships.
Ship demo projects with evaluation metrics; real evidence beats certificate-only positioning.