C#代写|COSC2276/2277 Sample questions for the test


Consider the following data model diagram and answer the questions that follow:

Now consider the following constraints:

• All primary keys have a key icon next to them.

• Cardinality relationship between entities (1…1, 1….* or *….*) is also indicated in

• Identify and implement foreign keys via Model, DataContext file(s)

• Navigation properties have been indicated in the diagram

OfficeAssignment entity

1. Location cannot be more than 50 characters

Student entity

1. Enrollment date must be of the format yyyy-mm-dd

2. FirstName and LastName cannot be more than 50 characters

3. For both FirstName and LastName, the first character should be upper case and
the remaining characters to be alphabetical

4. Required fields: FirstName, LastName

5. Add a calculated property to the model to display Full name of every student.

Instructor entity

1. Apply same constraints as Student entity to the Instructor entity.

Department entity

1. Name (maximum = 50 characters, minimum length = 3)

2. Budget must be of type currency

3. Start date must be of the format yyyy-mm-dd

Course entity

4. Course title (maximum = 50 characters, minimum length = 3)

5. Credits (range between 0 and 5)

Enrollment entity

1. Grade an enum which can have values A, B, C, D, E, F

2. Grade is a nullable field

CourseAssignment has a composite key.

Exercise 1:

Implement all of above using Model and DataContext files.

Exercise 2

Create a seed file to add some test data (5 rows each) to following entities:

Student, Instructor, Department, Course, OfficeAssignment, CourseAssignment and

Exercise 3

Create migrations and update database

Make sure that seed method runs when you start the application

Exercise 4

Create controller and associated view file(s) to display all courses run by the school.

Exercise 5

Create controller and associated view file(s) to display all instructors employed by the

Exercise 6

Modify above controller and view file(s) to display the following

i. You should be able to display courses taught by each instructor
ii. Students enrolled in each of the selected course

Exercise 7

Add controller to edit Instructor and Courses.

Exercise 8

Add pagination on course and instructor pages (4 records per page).

You may also like:
2022年5月16日 Online代修
作业代写|CIS 425 Final Project