wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AG ASP API 03 Developing Models/Using EF Core

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.
What does a domain model represent?
a)
HTML templates
b)
Real-world entities
c)
CSS styling
d)
IIS configuration
2.
In the Photo model, Comments represents…
a)
A single object
b)
A collection of related entities
c)
A string list
d)
A controller
3.
What does the “virtual” keyword enable in EF Core?
a)
CSS inheritance
b)
Lazy loading / navigation
c)
JSON parsing
d)
Routing
4.
The Comment model contains a Photo property because…
a)
It is required for logging
b)
It represents a navigation relationship
c)
It stores images
d)
It compiles Razor
5.
Data Annotations like [Display] are used for…
a)
SQL indexing
b)
UI display metadata
c)
File compression
d)
Routing
6.
Validating user input with DataAnnotations occurs…
a)
During publishing
b)
During model binding
c)
Inside SQL Server
d)
On the client only
7.
A GET action in a controller typically…
a)
Alters database
b)
Retrieves data
c)
Writes CSS
d)
Runs migrations
8.
A POST action typically…
a)
Deletes items
b)
Creates new data
c)
Resizes images
d)
Generates HTML
9.
What is a custom validator?
a)
Built-in EF feature
b)
User-defined validation logic
c)
Router configuration
d)
Razor renderer
10.
EF Core is described as…
a)
Closed-source
b)
Lightweight and cross-platform
c)
SQL-only
d)
Windows-only
11.
ORM stands for…
a)
Object Routing Map
b)
Object Relational Mapping
c)
Online Relational Model
d)
Object Rendering Method
12.
ORM bridges…
a)
HTML & CSS
b)
Objects and relational DBs
c)
IIS and SQL Server
d)
C# and Java
13.
DbContext represents…
a)
CSS theme
b)
A database session
c)
A controller
d)
An IIS module
14.
DbSet represents…
a)
Razor pages
b)
A table / collection of entities
c)
Console logs
d)
HTML components
15.
Registering DbContext is done…
a)
In Program.cs via DI
b)
In CSS files
c)
In wwwroot
d)
In browser console
16.
Repository pattern provides…
a)
UI templates
b)
Abstraction for data access
c)
CSS scoping
d)
Email sending
17.
Repository pattern helps with…
a)
Slowing performance
b)
Automated testing
c)
Removing controllers
d)
Serving static files
18.
Migrations in EF Core are used to…
a)
Style HTML
b)
Update database schema
c)
Configure IIS
d)
Manage logging
19.
Seeding data means…
a)
Clearing logs
b)
Providing initial DB entries
c)
Deleting tables
d)
Caching results
20.
EF LINQ queries allow…
a)
Building CSS
b)
Querying DB using objects
c)
Logging
d)
Serving images
21.
Saving data in EF Core uses…
a)
SaveToDisk()
b)
SaveChanges() / SaveChangesAsync()
c)
CommitHtml()
d)
PushData()
22.
Navigation properties help…
a)
Compile C#
b)
Navigate between related entities
c)
Style pages
d)
Create controllers
23.
In Comment model, PhotoID is…
a)
Cached file ID
b)
Foreign key
c)
HTML element ID
d)
Windows handle
24.
A typical EF workflow begins with…
a)
Creating controllers
b)
Defining models and DbContext
c)
Editing CSS
d)
Publishing
25.
EF Core is registered with DI to allow…
a)
View rendering
b)
Injecting DbContext where needed
c)
CSS styling
d)
IIS routing
26.
Migrations are executed via…
a)
Swagger UI
b)
Package Manager Console
c)
JSON file
d)
HTML form
27.
CRUD endpoints backed by EF Core return…
a)
JavaScript
b)
JSON responses
c)
Photoshop files
d)
CSS templates
28.
Persisting data ensures…
a)
Cache is cleared
b)
Data survives restarts
c)
Database resets each run
d)
Controllers delete data
29.
Connection strings are configured in…
a)
Controllers
b)
appsettings.json
c)
Razor views
d)
IIS logs
30.
EF Core supports…
a)
Only SQL Server
b)
Multiple databases
c)
Only MySQL
d)
No relational DBs