
Tag: QnA
-
-
Code-First approach in EF Core, including migrations.
Read More: Code-First approach in EF Core, including migrations.The Code-First approach allows you to define your database schema using .NET classes. EF Core uses these classes to generate the database schema. Migrations:
-
Middleware in ASP.NET Core with custom middleware
Read More: Middleware in ASP.NET Core with custom middleware -
Dependency Injection (DI) in ASP.NET Core, including different lifetime scopes.
Read More: Dependency Injection (DI) in ASP.NET Core, including different lifetime scopes.DI is a design pattern that allows classes to receive their dependencies from an external source, promoting loose coupling and testability. ASP.NET Core has built-in support for DI. Lifetime Scopes:
-
Explain polymorphism in detail, including method overloading and overriding.
Read More: Explain polymorphism in detail, including method overloading and overriding.Polymorphism allows objects of different classes to be treated as objects of a common type. Method Overloading: Method Overriding:
-
What are the four pillars of OOP?
Read More: What are the four pillars of OOP?Encapsulation: Hiding data and implementation details. Achieved through access modifiers (public, private, protected). Inheritance: Creating new classes based on existing classes. Promotes code reuse. Polymorphism: Allowing objects to take on multiple forms. Method overloading (same name, different parameters). Method overriding (derived class provides a different implementation of a base class method). Abstraction: Focusing on essential features and hiding unnecessary…
-
What is the difference between == and .Equals()?
Read More: What is the difference between == and .Equals()?==: Checks for reference equality (whether two references point to the same object) for reference types and value equality for value types. .Equals(): Virtual method. Can be overridden to provide custom equality logic. Example:
-
What is boxing and unboxing?
Read More: What is boxing and unboxing?Boxing: Converting a value type to an object (reference type). Unboxing: Converting an object back to a value type. Example:
-
What are events?
Read More: What are events?Events are a mechanism for objects to notify other objects about actions or changes. They are based on delegates and follow a publisher-subscriber pattern.
-
What are delegates?
Read More: What are delegates?Delegates are type-safe function pointers. They allow you to pass methods as arguments to other methods, enabling event handling and callback mechanisms. Type-safe function pointers. Purpose: Allow you to pass methods as arguments. Example: