Question: Using Visual Studio 2017, I need assistance with the following application; Create a new MVC application name EnrollementApplication Create a Student class under Model folder.

Using Visual Studio 2017, I need assistance with the following application;

Create a new MVC application name EnrollementApplication

Create a Student class under Model folder.

Student id

Student last name

Student first name

Create a Course class under Model folder.

Course id

Course title

Course description

Course credits

Create an Enrollment class under Model folder.

Enrollment Id

Student id

Course id

Grade

Student object

Course object

Build the application

Create an EnrollmentController

Choose MVC 5 controller with views, using Entity Framework and click Add

Select the model class as Enrollment class

Click the + sign to create a new Data Context class called EnrollmentDB

Name the controller as EnrollmentController

This should create the controller code, views and EnrollmentDB.cs

Run the application and see if the databases got created. Stop the application.

Go to Server Explorer and add atleast 5 students, 5 courses and 10 enrollments to the EnrollmentDB database

Add the following to the Enrollment class under Model folder.

IsActive (Boolean type)

AssignedCampus(String)

EnrollmentSemester(String)

EnrollmentYear(Integer)

Build the application

In the EnrollmentController, update the new fields to the bindings as needed.

Add the fields to Create view and Edit view using the Strongly typed Htmlhelpers (example @Html.LabelFor instead of @Html.Label)

IsActive will be a Checkbox

AssignedCampus will be a textbox

EnrollmentSemester will be a radiobutton {Spring, Summer, Fall are the options}

EnrollmentYear will be a textbox

All new fields should have Labels in front of them.

Add the fields to the Details view using Strongly types HtmlHelpers

IsActive will be a Checkbox

AssignedCampus will be a textbox

Use @Html.DisplayFor instead of @Html.RadioButtonFor for EnrollmentSemester

EnrollmentYear will be a textbox

All new fields should have Labels in front of them.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!