Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Ecole Supérieure Privée Technologies & Ingénierie

1. Which of the following is an entry point of ASP.NET Core application?

a) Main method of Program class

b) Configure method of Startup class

c) ConfigureService method of Startup class

d) Application_start method of Global.asax

2. By default, static files can be served from __________ folder.

a) bin

b) wwwroot

c) Any folder under the root folder

d) StaticFiles

3. The host for ASP.NET Core web application is configured in


_________ file.

a) Program.cs

b) Startup.cs

c) Middleware

d) None of the above

4. Every command in .NET Core command line interface starts with


_________.

a) core

b) dotnet

c) .net

d) Aspdotnet
5. The Startup class must include _________ method.

a) ConfigureService

b) Main

c) BuildWebHost

d) Configure

6. The _________ method in Startup class is used to registering


services with IoC container.

a) ConfigureService

b) Configure

c) Main

d) All of the above

7. Which of the following is executed on each request in ASP.NET Core


application?

a) Startup

b) Middlewares

c) Main method

d) All of the above

8. Middlewares can be configured using instance of type


____________.

a) IHostingEnvironment

b) ILoggerFactory

c) IApplicationBuilder

d) IMiddleware

9. Middlwares can be configured in ___________ method of Startup


class.

a) Configure
b) ConfigureService

c) Main

d) ConfigureMiddleware

10. Which of the following is environment variable in ASP.NET Core


application?

a) ASPNET_ENV

b) ENVIRONMENT_VARIABLE

c) ASPNETCORE_ENVIRONMENT

d) ENVIRONMENT

11. Which of the following extension method allow us to configure


custom error handling route?

a) UseExceptionHandler

b) UseDeveloperExceptionPage

c) UseWelcomePage

d) Run

12. Which of the following middleware must be installed to serve static


files in ASP.NET Core application?

a) Microsoft.AspNetCore

b) Microsoft.AspNetCore.Static

c) Microsoft.AspNetCore.StaticFiles

d) Microsoft.AspNetCore.Extensions

13. The full form of LINQ is _______.

a) Link-List Inner Query

b) Language-Integrated Query
c) Linked-Integrated Query

d) Lazy Integration Query


14. LINQ supports ________ syntax.

a) C# and F#

b) VB and F#

c) C# and VB

d) All of the above

15. Which of the following supports LINQ queries?

a) Object collection

b) XML Document

c) Entity Framework

d) All of the above

16. A class must implement ____________ interface in order to


provide querying facility using LINQ.

a) IEnumerator or IQueryable

b) IEnumerable or IQueryable

c) Enumerable or Queryable

d) None of the above

17. LINQ supports which of the following syntaxes?

a) Query syntax

b) Method syntax

c) All of the above

d) None of the above

18. var teenAgerStudent = from s in studentList


where s.Age > 12 && s.Age < 20
select s;
The above query is an example of ________ syntax.
a) Method syntax

b) Query syntax

c) C#

d) VB

19. What is the difference between First and FirstOrDefault?

a) First throws an exception whereas FirstOrDefault returns default value, if


no elements found for specified criteria.

b) First returns NULL whereas FirstOrDefault returns default value, if no


elements found for specified criteria.

c) First throws an exception whereas FirstOrDefault returns NULL, if no


elements found for specified criteria.

d) First returns void whereas FirstOrDefault returns NULL value, if no


elements found for specified criteria.

You might also like