ASP.NET Exam Flashcards
What line of code was used to convert the inner join select statement to a list?
allDetails = await results.ToListAsync();
What is the syntax for inner joins using LINQ?
from t in _db.Trays join ti in _db.TrayItems on t.Id equals ti.TrayId
select new TrayDetailsHelper { }
What annotation was needed to test with swagger?
[AllowAnonymous]
What is the route for the GetTrayDetails function?
[Route(“{ trayid }/{ email }”)]
What needs to be added to a quasar component if it is clickable?
@click
What is passed to the fetcher on the client side for the Tray Details?
tray/${ trayid }/{ user.email }
What information does the client need to send to get a list of trays?
User email
What query language is used in place of SQL?
LINQ
What 3 quantity fields are shown in the Case Study order history page?
- Ordered
- Sold
- Backordered
What Vue construct was used to display Tray details on the client?
Dialog
What tables were part of the inner join for the OrderDAO?
- Order
- OrderLineItem
- Product
What needs to be created with a marker for it to show?
popup
What is the distance formula?
sqrt((x2 - x1)^2 - (y2 - y1)^2))
What SQL function is used for the square root?
SQRT
What SQL function is used to square things?
POWER
What is the SET function in the stored procedure for distance?
SET @distance = SQRT(POWER(@lat2 - @lat1, 2) + POWER(@lng2 - @lng1, 2)) * 62.1371192
What folder was added to hold the front-end?
wwwroot
Where was the .csv file for the locations placed?
wwwroot
What was injected into the DataController to load the locations?
IWebHostEnvironment
What new using statement was added to the DataController?
Microsoft.AspNetCore.Mvc
What function was called on the IWebHostEnvironment object in the LoadStores function?
WebRootPath
What is returned from _env.WebRootPath?
string path
How do you use stored procedures from the DAO class?
FromSqlRaw(“dbo.storedProcedure”
How many server calls did the Vue code in the 3 Closest Stores exercise make?
2 - one to TomTom, one to us