.Net Full Stack Developer Interview QA
.Net Full Stack Developer Interview QA
General HR Questions
1. Tell me about yourself:
I am a .NET Full Stack Developer with [X] years of experience in developing web applications using
C#, ASP.NET Core, Angular, JavaScript, and SQL Server. I’ve worked on end-to-end project
development, API integrations, and performance optimization. I'm passionate about clean code and
continuous learning. I also enjoy mentoring juniors and collaborating with cross-functional teams.
Sai Reddy
saireddy-dotnetfs
9. How do you handle pressure or deadlines?
I prioritize tasks, plan ahead, and remain calm under pressure. I break down large tasks and stay
focused on solutions. I also communicate early if risks arise to ensure timely delivery.
10. What is your notice period?
My notice period is 45 days. However, I am willing to negotiate for an early release if required.
Sai Reddy
saireddy-dotnetfs
5. What are async and await in C#?
• async marks a method as asynchronous.
• await is used to pause execution until a Task completes, without blocking the thread.
async Task<string> GetDataAsync() {
await Task.Delay(1000);
return "Done";
}
6. What is dependency injection?
Dependency Injection (DI) is a design pattern that provides dependencies (services) from outside
rather than creating them inside the class. It promotes loose coupling and testability.
public class Service {
private readonly ILogger _logger;
public Service(ILogger logger) {
_logger = logger;
}
}
Sai Reddy
saireddy-dotnetfs
• Each middleware can perform operations before and after the next middleware in the
pipeline.
app.UseMiddleware<CustomLoggingMiddleware>();
Sai Reddy
saireddy-dotnetfs
Data Access
1. What are the components of ADO.NET?
ADO.NET has two main types of components:
• Connected components (work with live DB connection):
o SqlConnection
o SqlCommand
o SqlDataReader
o SqlTransaction
• Disconnected components (work without continuous DB connection):
o DataSet
o DataTable
o DataAdapter
o DataRelation
try
{
command.CommandText = "INSERT INTO Orders ...";
command.ExecuteNonQuery();
transaction.Commit();
}
catch
Sai Reddy
saireddy-dotnetfs
{
transaction.Rollback();
}
}
Sai Reddy
saireddy-dotnetfs
Dapper:
3. How do you perform joins and stored procedure calls using Dapper?
Join Example:
var sql = @"SELECT o.*, c.*
FROM Orders o
INNER JOIN Customers c ON o.CustomerId = c.Id";
Sai Reddy
saireddy-dotnetfs
parameters,
commandType: CommandType.StoredProcedure
);
Frontend – Angular / HTML / CSS / JavaScript
Angular
Sai Reddy
saireddy-dotnetfs
6. How do you handle routing in Angular?
Angular uses the RouterModule to define routes in an app.
Steps:
1. Define routes:
2. const routes: Routes = [
3. { path: 'home', component: HomeComponent },
4. { path: 'about', component: AboutComponent }
5. ];
6. Import RouterModule.forRoot(routes) in AppModule.
7. Use <router-outlet> in HTML and [routerLink] for navigation.
@Pipe({
name: 'uppercasePipe',
pure: true // Default is true, so it's pure
})
export class UppercasePipe implements PipeTransform {
transform(value: string): string {
Sai Reddy
saireddy-dotnetfs
return value.toUpperCase(); } }
In this example, Angular will re-run the transform() method only when the value input changes, i.e.,
when the reference to the string changes.
Impure Pipes:
• Definition: An impure pipe recalculates the output whenever Angular checks the view,
regardless of whether the input reference has changed. This includes scenarios where the
pipe's input is a complex object, array, or something that might change internally (e.g., array
contents or object properties).
• Performance: Impure pipes are less efficient because they are recalculated on every change
detection cycle, even if the input reference hasn't changed.
• Usage: Impure pipes are typically used when you need to track changes in objects that are
mutable, like arrays, or when your pipe relies on other sources of change (e.g., global state).
Example of an Impure Pipe:
Let's create an impure pipe that filters an array and returns the elements that match a given
condition. Since the array might change (e.g., elements could be added or removed), Angular needs
to re-run this pipe on every change detection cycle.
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'filterArray',
pure: false // This makes the pipe impure
})
export class FilterArrayPipe implements PipeTransform {
transform(value: any[], condition: string): any[] {
return value.filter(item => item.includes(condition));
}
}
In this case, Angular will re-run the pipe every time change detection runs, even if the array
reference itself doesn't change, as long as any internal change occurs (like adding/removing items
from the array).
Key Differences:
Feature Pure Pipe Impure Pipe
Recalculation
Only when input reference changes Every change detection cycle
Trigger
Efficiency More efficient (recalculates less) Less efficient (recalculates more)
Default Behavior True by default Must be explicitly set to false
Simple transformations (e.g., string Complex objects/arrays that might
Use Cases
manipulations) change internally
JavaScript
Sai Reddy
saireddy-dotnetfs
Keyword Scope Reassignable Hoisted Notes
let Block Yes No Use for variables that change
Use for constants (must be
const Block No No
initialized)
Sai Reddy
saireddy-dotnetfs
const data = await res.json();
console.log(data);
} catch (err) {
console.error(err);
}
}
HTML/CSS
1. What are semantic HTML elements?
Semantic HTML elements provide meaning to the web content, helping both browsers and
developers understand the structure of the webpage better. These elements also improve
accessibility and SEO.
Examples of semantic elements:
<header>, <footer>, <article>, <section>, <nav>, <main>
2. What is the box model?
The box model defines the layout structure of an element, consisting of:
• Content: The actual content (e.g., text or images).
• Padding: Space between content and border.
• Border: The border surrounding the padding (optional).
• Margin: Space between the element's border and adjacent elements.
In total, the box model looks like this:
Margin -> Border -> Padding -> Content
3. How does Flexbox work?
Flexbox (Flexible Box Layout) is a CSS layout model that enables easy alignment and distribution of
items within a container, even when their sizes are unknown or dynamic.
• Main axis: Horizontal or vertical direction where items are laid out.
• Cross axis: Perpendicular to the main axis.
Flexbox makes it simple to:
• Center items vertically or horizontally.
• Control the order of elements.
• Automatically adjust items' sizes.
.container {
display: flex;
justify-content: center; /* Horizontally center items */
align-items: center; /* Vertically center items */
}
4. How do you make a responsive website using Bootstrap?
To create a responsive website using Bootstrap:
1. Include the Bootstrap CSS file in your project.
2. Use Bootstrap’s grid system with rows and columns (.container, .row, .col-*).
3. Apply responsive classes like .col-md-4 to control layout for different screen sizes (small,
medium, large).
4. Use Bootstrap’s built-in classes like .img-fluid for responsive images and .d-none for hiding
elements on specific breakpoints.
Example of a responsive grid:
<div class="container">
Sai Reddy
saireddy-dotnetfs
<div class="row">
<div class="col-md-4">Column 1</div>
<div class="col-md-4">Column 2</div>
<div class="col-md-4">Column 3</div>
</div>
</div>
5. What is the difference between inline, inline-block, and block?
• Inline:
o Does not start on a new line.
o Only takes up as much width as necessary.
o Cannot set width/height.
o Example: <span>, <a>
• Inline-block:
o Behaves like inline but allows setting width and height.
o Elements stay on the same line unless the width exceeds the container.
o Example: <img>, <button>
• Block:
o Takes up the full width of the parent, starts on a new line.
o Can have width/height.
o Example: <div>, <p>
SQL
1. What are joins in SQL? Explain different types.
Joins are used to combine rows from two or more tables based on a related column between them.
Common types of joins:
• INNER JOIN: Returns only rows that have matching values in both tables.
SELECT * FROM Orders
INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;
• LEFT JOIN (OUTER JOIN): Returns all rows from the left table and matched rows from the
right table. If no match, NULL values are returned for right table columns.
SELECT * FROM Orders
LEFT JOIN Customers ON Orders.CustomerID = Customers.CustomerID;
• RIGHT JOIN (OUTER JOIN): Returns all rows from the right table and matched rows from the
left table. If no match, NULL values are returned for left table columns.
SELECT * FROM Orders
RIGHT JOIN Customers ON Orders.CustomerID = Customers.CustomerID;
• FULL OUTER JOIN: Returns rows when there is a match in either the left or right table. If no
match, NULL values are returned for non-matching rows.
SELECT * FROM Orders
FULL OUTER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;
• CROSS JOIN: Returns the Cartesian product of both tables (every row of the first table is
combined with every row of the second table).
SELECT * FROM Orders
CROSS JOIN Products;
2. What is the difference between WHERE and HAVING?
Sai Reddy
saireddy-dotnetfs
• WHERE: Filters rows before aggregation (used in SELECT, UPDATE, DELETE queries). It cannot
be used with aggregate functions.
SELECT * FROM Orders WHERE Amount > 100;
• HAVING: Filters rows after aggregation (used with GROUP BY and aggregate functions like
COUNT, SUM).
SELECT CustomerID, COUNT(*) FROM Orders
GROUP BY CustomerID
HAVING COUNT(*) > 5;
3. What is indexing? What types of indexes are there?
Indexing is a technique used to speed up the retrieval of data from a table. It creates a data
structure that allows quick lookup of rows based on column values.
Types of indexes:
• Unique Index: Ensures that the values in the indexed column are unique.
• Composite Index: Index on multiple columns.
• Clustered Index: Sorts and stores the data rows in the table based on the index (each table
can have only one clustered index).
• Non-clustered Index: Stores a separate structure from the table data, pointing to the rows.
• Full-text Index: Used for searching large text fields.
Sai Reddy
saireddy-dotnetfs
5. Use proper joins: Avoid unnecessary joins and prefer INNER JOIN over OUTER JOIN unless
necessary.
6. Analyze and optimize execution plans (e.g., using EXPLAIN in MySQL).
7. Limit the number of rows returned using LIMIT or TOP when applicable.
8. Consider using batch processing for large datasets.
IF @@ERROR != 0
ROLLBACK;
ELSE
COMMIT;
Transactions help maintain data integrity.
Azure DevOps
1. What is Azure DevOps?
Azure DevOps is a set of development tools from Microsoft for planning, developing, testing, and
deploying software. It provides a full DevOps toolchain to support continuous integration and
continuous delivery (CI/CD).
Key features:
• Azure Repos: Source control management (Git or TFVC).
• Azure Pipelines: CI/CD pipelines for building, testing, and deploying code.
• Azure Boards: Agile project management and tracking work items.
• Azure Test Plans: Testing tools and managing test cases.
• Azure Artifacts: A package management system to host and share packages.
Sai Reddy
saireddy-dotnetfs
1. Set up a project in Azure DevOps.
2. Create a repository (Azure Repos or GitHub).
3. Create a Pipeline:
o Go to Pipelines and click New Pipeline.
o Choose the repository (e.g., Azure Repos Git, GitHub, etc.).
o Select a template or create a YAML pipeline (defining stages like build, test, deploy).
4. Configure Build Steps:
o Add build tasks (e.g., restore, build, test).
o Choose a build agent (e.g., Hosted Ubuntu, Windows).
5. Configure Release Steps:
o After build completion, create a release pipeline to deploy to different environments.
o Configure approval processes, and environment variables, and set deployment
triggers.
6. Run and monitor the pipeline for success or failure.
3. What is a build and release pipeline?
• Build Pipeline: This is responsible for building the source code, running tests, and packaging
the application. It triggers when changes are made to the repository and creates build
artifacts (e.g., .exe, .jar, or Docker image).
Example tasks in a build pipeline:
o Restore dependencies.
o Compile code.
o Run unit tests.
o Publish artifacts.
• Release Pipeline: The release pipeline deploys the build artifacts to various environments
(e.g., Dev, QA, Production) and handles the continuous delivery process. It can include tasks
like configuration, approval gates, and deployment.
Example tasks in a release pipeline:
o Deploy to development.
o Run smoke tests.
o Deploy to production.
4. How do you manage source control in Azure Repos?
Azure Repos is a Git-based version control system that helps manage source code.
Key steps to manage source control:
1. Create a repository in Azure DevOps under Repos.
2. Clone the repository locally using Git commands:
3. git clone https://dev.azure.com/your_organization/your_project/_git/your_repo
4. Add, commit, and push changes:
5. git add .
6. git commit -m "Your commit message"
7. git push
8. Branching and Merging: You can create branches for new features or fixes and merge them
via Pull Requests (PRs) to maintain code quality and control.
9. Branch Policies: Set branch policies in Azure DevOps (e.g., required reviewers, build
validation) to enforce rules.
5. What are artifacts?
Artifacts are the files or packages produced by a build pipeline, which can be shared and deployed
through a release pipeline.
Sai Reddy
saireddy-dotnetfs
Examples of artifacts:
• Compiled binaries (e.g., .exe, .dll, .jar)
• Docker images
• Deployment packages (e.g., .zip or .tar files)
• Configuration files
• NuGet, npm, or other package manager files
interpersonal and problem-solving
1. Describe a challenging bug you fixed and how.
I encountered a bug where an API was returning incorrect data intermittently. The issue was traced
to a race condition where multiple threads were accessing shared resources without proper
synchronization.
Steps taken:
• I reviewed the code to identify shared resources.
• Added locking mechanisms (lock statements in C#) to ensure that only one thread could
access the resource at a time.
• After implementing the fix, I added unit tests to cover this scenario and confirmed that the
issue was resolved.
The bug was fixed by ensuring thread safety and thorough testing, which prevented the issue from
reoccurring.
2. Have you worked in Agile methodology?
Yes, I’ve worked in Agile for several years. My teams followed Scrum practices, working in 2-week
sprints with regular stand-ups, sprint planning, and sprint retrospectives.
During each sprint:
• We prioritized tasks based on business value.
• We collaborated closely with stakeholders for feedback.
• At the end of each sprint, we delivered a potentially shippable product increment.
This iterative approach helped improve collaboration, allowed for faster delivery, and enabled us to
quickly adapt to changes.
3. How do you handle code reviews?
I view code reviews as an opportunity for learning and improving code quality. When reviewing
code, I focus on:
• Readability: Ensuring the code is clear and easy to understand.
• Performance: Checking for any inefficiencies or potential performance issues.
• Best practices: Verifying adherence to coding standards and design principles (e.g., SOLID).
• Test coverage: Ensuring that the code is well-tested and handles edge cases.
During the review process, I provide constructive feedback, being mindful of the tone and focusing
on solutions. I also appreciate feedback on my own code and use it to enhance my skills.
4. Tell me about a time you disagreed with your team lead. How did you handle it?
In one project, I disagreed with my team lead on the approach to handle error logging. I believed
using a centralized logging service would improve maintainability, while my lead preferred a more
lightweight, local solution.
How I handled it:
• I presented my arguments with clear reasoning, demonstrating the long-term benefits of a
centralized logging approach (e.g., easier monitoring, better scalability).
• I also listened to my team lead's concerns, acknowledging their points about simplicity.
• Ultimately, we found a compromise: We implemented centralized logging but made it
optional for specific modules, allowing flexibility.
Sai Reddy
saireddy-dotnetfs
5. How do you prioritize tasks when working on multiple modules?
When managing multiple modules, I follow these steps:
1. Assess the importance and urgency of each task, considering business impact and deadlines.
2. Break down complex tasks into smaller, manageable chunks, ensuring that critical tasks are
completed first.
3. Use tools like task boards (e.g., JIRA) to track progress and ensure transparency.
4. Collaborate with the team to balance workloads and address any blockers.
5. Communicate regularly with stakeholders to align expectations and adjust priorities if
needed.
Sai Reddy
saireddy-dotnetfs