Student System - svetlilaloli/EntityFramework-SoftUni GitHub Wiki

Entity relations - Code first

Student System

The task is to create a database for the Student System, using the EF Core Code First approach.

Constraints

Your namespaces should be:

  • P01_StudentSystem – for your Startup class, if you have one
  • P01_StudentSystem.Data – for your DbContext
  • P01_StudentSystem.Data.Models – for your models

Your models should be:

  • StudentSystemContext – your DbContext
  • Student:
    • StudentId
    • Name (up to 100 characters, unicode)
    • PhoneNumber (exactly 10 characters, not unicode, not required)
    • RegisteredOn
    • Birthday (not required)
  • Course:
    • CourseId
    • Name (up to 80 characters, unicode)
    • Description (unicode, not required)
    • StartDate
    • EndDate
    • Price
  • Resource:
    • ResourceId
    • Name (up to 50 characters, unicode)
    • Url (not unicode)
    • ResourceType (enum – can be Video, Presentation, Document or Other)
    • CourseId
  • Homework:
    • HomeworkId
    • Content (string, linking to a file, not unicode)
    • ContentType (enum – can be Application, Pdf or Zip)
    • SubmissionTime
    • StudentId
    • CourseId
  • StudentCourse – mapping class between Students and Courses

Table relations:

  • One student can have many CourseEnrollments
  • One student can have many HomeworkSubmissions
  • One course can have many StudentsEnrolled
  • One course can have many Resources
  • One course can have many HomeworkSubmissions

You will need a constructor, accepting DbContextOptions to test your solution in Judge!