You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, read the Tag Helpers in ASP.NET Core article to find out how to write custom elements to inject data into your DOM. Make sure you click on the Built-in Tag Helpers section to see a list of all of the ones available to you out of the box.
Your first task for this chapter is to start a new Visual Studio Web Application (MVC) project named StudentExercisesMVC. Once the project is created, you will need to install Dapper as a dependency. You can use the Package Manager console in Visual Studio, or you can do it from the command line with dotnet add package Dapper. If you do it from the command line, make sure you execute dotnet restore to enable it for your project.
Now you need to make a controller and a Razor template in order to manage the cohorts for your database.
Use scaffolding to...
Create a CohortsController in your controllers directory.
Create a Views > Cohorts directory and use the scaffolding to the create the Index, Details, Create, Edit, and Delete views.
In your controller, use Dapper to execute SQL statements for all of those actions.
Displaying a List of Instructors
Use scaffolding to...
Create a InstructorsController in your controllers directory.
Create a Views > Instructors directory and use the scaffolding to the create the Index, Details, Create, Edit, and Delete views.
In your controller, use Dapper to execute SQL statements for all of those actions.
When you create or edit an instructor, you should be able to assign the instructor to a cohort from a select element in the form.
Displaying a List of Students
Use scaffolding to...
Create a StudentsController in your controllers directory.
Create a Views > Students directory and use the scaffolding to the create the Index, Details, Create, Edit, and Delete views.
In your controller, use Dapper to execute SQL statements for all of those actions.
When you create or edit a student, you should be able to assign the student to a cohort from a select element in the form.
Displaying a List of Exercises
Use scaffolding to...
Create a ExercisesController in your controllers directory.
Create a Views > Exercises directory and use the scaffolding to the create the Index, Details, Create, Edit, and Delete views.
In your controller, use Dapper to execute SQL statements for all of those actions.