PWC Interview Exp for Azure-DotNet Associate
Summary
I interviewed for an Azure-DotNet Associate role at PWC, discussing my projects, .NET core concepts, C# data structures, and database/unit testing. The interviewer noted I knew the concepts but lacked confidence, suggesting I work on certain areas.
Full Experience
- Introduce yourself and projects you worked on
ans i told 2 projects i worked on first for core banking application my task was small code changes bug fixing and deployement, monthly deployement. second project i mostly workd on xUnit Framework and Moq also worked with database and backend - So you have worked in dot net core how its different from dot net
- How dependency Injection is used in Dot Net and Dot Net Core whats diff in diff frameworks.
- How you do DI write syntax on notepad.
- Why we inject it in Program.cs
- What AddScoped Does
- What if i want new instance every time the service is requested.
- What is the real time scenario of question number 7.
- I have a interface a which having add method and interface b which same method add method how many times add method needed to implemented - -i think i did't understand the question properly but i answered only one time needed.
public interface IA { void Add(); } public interface IB { void Add(); }public class MyClass : IA, IB { public void Add() => Console.WriteLine("Add called"); } - what will be the output of this code
List<int> intList = new List<int>(); intList.Add(1); intList.Add(2); var intList2 = intList; intList.RemoveAt(0);foreach (var item in intList) { Console.WriteLine(item); }
foreach (var item in intList2) { Console.WriteLine(item); } - How we fix above code to get diff list and diff output
ans - replace line withvar intList2 = new List<int>(intList); - Can you write update endpoints
- if there is two methods in diff controller file how http request will follow particular method.
- Can you write a method form where I call method it will give two values first name last name form method
- from c# code if we want to update 10 customer details in single task how we can do that.
To pass 10 customer records at once to a stored procedure, the best way is using a Table-Valued Parameter (TVP). - If there is TVP with 5 column what if i want to add one more how we can do that.
- Create one table customer table we have some customer active and inactive u want to save inactive what will the data type of isActive variable in C# and in query
- How do we unit test a custom Exception in xUnit
- How we hardcode that
Interviewer feedback - - you know things but you are not confident. Why ??How many months of exp do you have me- 2.5. he - In Some fields you need to work.
Interview Questions (19)
Introduce yourself and projects
Introduce yourself and projects you worked on
Difference between .NET Core and .NET Framework
So you have worked in dot net core how its different from dot net
Dependency Injection in .NET and .NET Core
How dependency Injection is used in Dot Net and Dot Net Core whats diff in diff frameworks.
Write Dependency Injection Syntax
How you do DI write syntax on notepad.
Why inject DI in Program.cs
Why we inject it in Program.cs
What AddScoped Does
What AddScoped Does
Service Lifetime for new instance every request
What if i want new instance every time the service is requested.
Real-time scenario for new service instance per request
What is the real time scenario of question number 7.
Interface Implementation with Duplicate Method Signatures
I have a interface a which having add method and interface b which same method add method how many times add method needed to implemented. I think I didn't understand the question properly but I answered only one time needed.
public interface IA { void Add(); }
public interface IB { void Add(); }
public class MyClass : IA, IB
{
public void Add() => Console.WriteLine("Add called");
}C# List Reference Output
what will be the output of this code
List<int> intList = new List<int>();
intList.Add(1);
intList.Add(2);
var intList2 = intList;
intList.RemoveAt(0);
foreach (var item in intList)
{
Console.WriteLine(item);
}
foreach (var item in intList2)
{
Console.WriteLine(item);
}Fix C# List Reference Issue
How we fix above code to get diff list and diff output
Write Update Endpoints
Can you write update endpoints
HTTP Request Routing to Controller Methods
if there is two methods in diff controller file how http request will follow particular method.
Method to Return First Name and Last Name
Can you write a method form where I call method it will give two values first name last name form method
Update Multiple Customer Details in C#
from c# code if we want to update 10 customer details in single task how we can do that.
Adding Column to Table-Valued Parameter (TVP)
If there is TVP with 5 column what if i want to add one more how we can do that.
Customer Table: isActive Data Type
Create one table customer table we have some customer active and inactive u want to save inactive what will the data type of isActive variable in C# and in query
Unit Test Custom Exception in xUnit
How do we unit test a custom Exception in xUnit
Hardcoding Techniques
How we hardcode that