TraviYo
Netscribes Interview Questions and Answers
Q1. Different between Transient,Add Scope and AddSingleton
Transient creates a new instance every time it is requested, Scoped creates a new instance per scope, Singleton creates a single instance for the entire application.
Transient: Creates a new instance every time it is requested.
AddScoped: Creates a new instance per scope, such as per HTTP request.
AddSingleton: Creates a single instance for the entire application.
Example: Transient can be used for lightweight services that don't hold state, Scoped for services that need to maint...read more
Q2. Whai is Sql Join and why do we need it
SQL Join is used to combine rows from two or more tables based on a related column between them.
Join is used to retrieve data from multiple tables in a single query.
It helps in avoiding data redundancy and improving query performance.
Different types of joins include inner join, left join, right join, and full outer join.
Join conditions are specified using the ON keyword.
Example: SELECT * FROM table1 JOIN table2 ON table1.column = table2.column;
Q3. How to create a table using MYSQL
To create a table using MYSQL, use the CREATE TABLE statement followed by the table name and column definitions.
Use the CREATE TABLE statement to create a new table
Specify the table name after the CREATE TABLE statement
Define the columns and their data types within parentheses
Add any additional constraints or attributes to the columns
Example: CREATE TABLE employees (id INT, name VARCHAR(50), age INT)
Q4. What is filter in dot net core
Filters in .NET Core are used to intercept HTTP requests and responses.
Filters are used to add cross-cutting concerns to MVC applications.
They can be used for authentication, authorization, logging, exception handling, etc.
Filters can be applied globally, at the controller level, or at the action level.
Examples of filters include AuthorizeFilter, ExceptionFilter, and ActionFilter.
Q5. Difference between dataset and datareader
Dataset is an in-memory representation of a relational database, while DataReader is a forward-only, read-only stream of data.
Dataset is a disconnected architecture, while DataReader is a connected architecture.
Dataset can hold multiple tables and relationships, while DataReader can only hold a single table.
Dataset can be used for data manipulation and updates, while DataReader is read-only.
Dataset requires more memory as it loads all data at once, while DataReader loads data...read more
Q6. What is dependency injection
Dependency injection is a design pattern that allows objects to be loosely coupled and dependencies to be injected at runtime.
Dependency injection is a way to achieve inversion of control.
It helps in creating modular and testable code.
Dependencies are provided to a class through constructor injection, property injection, or method injection.
It promotes code reusability and maintainability.
Example: In a .NET Core application, services can be registered in the dependency inject...read more
Interview Process at Netscribes
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month