Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

2 What are the implications for logistics strategy?

Answered: 1 week ago