Tavant Technologies
Polestar Solutions & Services India Interview Questions and Answers
Q1. How to register dependency Injection in asp.net core??
Dependency Injection in ASP.NET Core is registered in ConfigureServices method of Startup class.
Add services.AddSingleton
(); for singleton lifetime Add services.AddScoped
(); for scoped lifetime Add services.AddTransient
(); for transient lifetime
Q2. How to improve performance of an Stored procedure
To improve performance of a Stored procedure, optimize query, use indexes, minimize data retrieval, and avoid cursors.
Optimize query by using proper indexing
Minimize data retrieval by fetching only required columns
Avoid using cursors for looping through data
Use SET NOCOUNT ON to stop the message indicating the number of rows affected by a Transact-SQL statement
Q3. Difference between read-only and const with an example
Read-only variables can be modified by the program, while const variables cannot be changed.
Read-only variables can be modified by the program during runtime, while const variables cannot be changed at all.
Using 'const' keyword ensures that the value of the variable remains constant throughout the program.
Read-only variables are typically used when the value needs to be initialized at runtime, while const variables are used for values that should not change.
Example: int readO...read more
Q4. Write code on abstract class and interface?
Abstract classes and interfaces are used in object-oriented programming to define common behavior and structure for classes.
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Classes can implement multiple interfaces but can only inherit from one abstract class.
Abstract classes can have constructors, while interfaces cannot.
Example: abstract class Animal { abstract void makeSound(); } interface Flyable { void fly(); ...read more
Q5. What is Polymorphism ?
Polymorphism is the ability of a single function or method to operate on different types of data.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example of compile-time polymorphism: function overloading where multiple functions have the same name but different parameters.
Example of runtime polymorphism: method overriding wher...read more
Q6. What is inceptor in angular?
Inceptor in Angular is a service that allows intercepting HTTP requests and responses.
Inceptor is used for modifying requests or responses before they are sent or received.
It can be used for adding headers, logging, error handling, etc.
Example: intercepting requests to add authentication token.
Q7. What is dependency Injection
Dependency Injection is a design pattern in which components are given their dependencies rather than creating them internally.
Allows for easier testing by providing mock dependencies
Promotes loose coupling between components
Improves code reusability and maintainability
Commonly used in frameworks like Spring in Java
Q8. Explain abt JWT
JWT stands for JSON Web Token, a compact and self-contained way for securely transmitting information between parties as a JSON object.
JWT is commonly used for authentication and information exchange in web development.
It consists of three parts: header, payload, and signature.
The header typically consists of the type of token and the signing algorithm being used.
The payload contains the claims, which are statements about an entity and additional data.
The signature is used to...read more
Interview Process at Polestar Solutions & Services India
Top Team Lead Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month