Skip to content
 
 

Repository files navigation

Unit 6 Project 1

Getting Started

Running the project

  • Run the program and in the web browser manually change the URL to localhost:9999/courses
  • Test out CRUD

Where to look for help

Tasks to complete

  1. Add a Seeding Script
  2. Update the Model
  3. Fix links
  4. Add EndTime

Seeding

  • For a example look back at our pizza project or this
  • Add at least 5 courses
  • Make sure to test the script by deleting all the courses
  • You can delete the courses by using DB tool or using Web UI

Update the Model

  • Add Display names to any field with two words
    • Ex CourseName should become Course Name in the views
  • To change the display name use a [Display] attribute.

Fix links

  • Update the Nav bar so you can navigate to the CRUD of courses.
    • Link will be /Courses/Index

Add EndTime to project

  • Add EndTime property to the Course.cs model
  • Added EndTime to all the views Creat, Delete, Details
    • In the index make sure you display the EndTime
  • Do a migration to update the database
  • Update seeding script to include new field

Commands for migration

  • To be done in NuGet or using Plugin or in .NET CLI

Using NuGet

Add-Migration EndTime
Update-Database

Using .NET CLI (easiest way)

dotnet ef migrations add EndTime
dotnet ef database update

About

Unit 6 Project 1

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages