ASP.NET Exam Flashcards

1
Q

What line of code was used to convert the inner join select statement to a list?

A

allDetails = await results.ToListAsync();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the syntax for inner joins using LINQ?

A

from t in _db.Trays join ti in _db.TrayItems on t.Id equals ti.TrayId
select new TrayDetailsHelper { }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What annotation was needed to test with swagger?

A

[AllowAnonymous]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the route for the GetTrayDetails function?

A

[Route(“{ trayid }/{ email }”)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What needs to be added to a quasar component if it is clickable?

A

@click

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is passed to the fetcher on the client side for the Tray Details?

A

tray/${ trayid }/{ user.email }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What information does the client need to send to get a list of trays?

A

User email

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What query language is used in place of SQL?

A

LINQ

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What 3 quantity fields are shown in the Case Study order history page?

A
  1. Ordered
  2. Sold
  3. Backordered
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What Vue construct was used to display Tray details on the client?

A

Dialog

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What tables were part of the inner join for the OrderDAO?

A
  1. Order
  2. OrderLineItem
  3. Product
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What needs to be created with a marker for it to show?

A

popup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the distance formula?

A

sqrt((x2 - x1)^2 - (y2 - y1)^2))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What SQL function is used for the square root?

A

SQRT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What SQL function is used to square things?

A

POWER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the SET function in the stored procedure for distance?

A

SET @distance = SQRT(POWER(@lat2 - @lat1, 2) + POWER(@lng2 - @lng1, 2)) * 62.1371192

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What folder was added to hold the front-end?

A

wwwroot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Where was the .csv file for the locations placed?

A

wwwroot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What was injected into the DataController to load the locations?

A

IWebHostEnvironment

20
Q

What new using statement was added to the DataController?

A

Microsoft.AspNetCore.Mvc

21
Q

What function was called on the IWebHostEnvironment object in the LoadStores function?

A

WebRootPath

22
Q

What is returned from _env.WebRootPath?

A

string path

23
Q

How do you use stored procedures from the DAO class?

A

FromSqlRaw(“dbo.storedProcedure”

24
Q

How many server calls did the Vue code in the 3 Closest Stores exercise make?

A

2 - one to TomTom, one to us

25
What does the search/geocode call to TomTom maps do?
Returns geometry, including Lon and Lat
26
What does tt.map do?
Creates the map
27
What is TomTom Maps?
JavaScript API
27
What file was updated to be able to use TomTom libraries on the client side?
index.template.html
27
What was imported from vue to instantiate mapRef?
ref
27
How was tt instantiated?
window.tt
27
What is ref comparable to?
reactive
27
What does ref do?
Makes an individual component reactive, like the map div
28
What are the 4 steps in getting the map on the client?
1. Get lat and lon 2. Make a call to TomTom to create map 3. Add meta-data like zoom level, center, etc 4. Use ref to render
29
What kind of Azure service did we use?
Platform as a Service
30
What file was updated to allow for the app to contact the Azure db?
appsettings.json
31
Which file was changed on the client to allow for a relative path?
apiutils.js
32
How do you specify a relative path for the client?
"/api/"
33
How do you build the client?
npx quasar build
34
What folder does the client build to?
dist\spa
35
Where do you change "swagger"?
launchSettings.json lauchUrl
36
What had to be added to the Program.cs middleware before publishing the app to Azure?
app.UseDefaultFiles();
37
What is IAAS?
Infrastructure as a Service
38
What is PAAS?
Platform as a Service
39
What is SAAS?
Software as a Service
40
Other than the db, what did we make in Azure?
App Services
41
What does the URL end with once the application deployed?
azurewebsites.net