INFO 3067 Midterm Flashcards
What is the default method for controllers?
Index
What file is the connection string located?
appsettings.json
What is the DAL?
Data Access Layer
What 2 folders are held in the DAL?
- DAO
- DomainClasses
What are the 4 steps in the “code-first” approach?
- Create Domain Classes
- Add class to the DbContext class
- add-migration
- update-database
What annotations are used to represent a primary key?
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
What annotations are used to set up a foreign key?
[ForeignKey(“FieldName”)]
public Foreign? Foreign { get; set; }
What is the DbContext class?
Represents a session with the database
Where is the DbContext class found?
DAL
How do you add an entity to the DbContext class?
public virtual DbSet< Entity >? Entity { get; set; }
What does the middleware do?
Controls how the application responds to HTTP requests
What file houses the middleware?
Program.cs
What 2 keywords are used for asynchronous programming?
- async
- await
What 3 things are required in an asynchronous method definition?
- async
- Task< return type >
- method name ends with “Async()”
What kind of methods are defined by a controller?
Action Methods
What must a controller class name end with?
“Controller”
What is the return type of controller methods?
IActionResult
What is the keyword dynamic used for?
Variable’s type can change or is unknown until runtime
What is .RemoveRange method?
Removes rows from the database when called on a DbContext object
What does the .Distinct method return?
IEnumerable collection
What makes the AppDbContext available to the controller?
Middleware via dependency injection
What is needed to install Vue?
Node.js, only for the npm
What is npm?
Node Package Manager
What are the 3 parts of a route in Vue?
- path
- name
- component
How do you start up the development server for quasar?
npx quasar dev
What does the layout do?
Shares a common look and feel between pages