Kleine Webpage mit MVC

Hey, also ich bin gerade dabei c# .Net 6 und MVC etwas zu lernen. Ich habe hierfür ein kleines Projekt. Das Projekt besitzt folgende Struktur:

Mein Projekt soll sich ich explizit erstmal nur um „TeachingPlan“ drehen. Hierzu habe ich erstmal ein „Lesson“ Modell angelegt:

namespace Test.Models
{
    public class Lesson

    {
        private int id;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        private string? name;

        public string? Name
        {
            get { return name; }
            set { name = value; }
        }

        private string? cardDeckLink;

        public string? CardDeckLink
        {
            get { return cardDeckLink; }
            set { cardDeckLink = value; }
        }

        private TimeSpan timeEstimation;

        public TimeSpan TimeEstimation
        {
            get { return timeEstimation; }
            set { timeEstimation = value; }
        }

         public Lesson(int id, string name, string cardDeckLink, TimeSpan timeEstimation)
        {
            Id = id;
            Name = name;
            CardDeckLink = cardDeckLink;
            TimeEstimation = timeEstimation;
        }


    }
}

Nun habe ich eine View Modelle angelegt. Einmal für Lesson:

using Test.Controllers;

namespace Test.Controllers
{
    public class LessonViewModel
    {
        public int Id { get; set; }
        public string? Name { get; set; }
        public string? CardDeckLink { get; set; }
        public TimeSpan TimeEstimation { get; set; }
    }
}

Dann noch für den teaching Plan:

using Test.Controllers;

namespace Test.Models
{

    public class TeachingPlanViewModel
    {
        public List<LessonViewModel>? Lessons { get; set; }

    }
}

Jetzt fehlt nur noch der Controller:

using Microsoft.AspNetCore.Mvc;
using Test.Models;



namespace Test.Controllers
{
    
    public class TeachingplanController : Controller
    {

        public ViewResult Index()
        {
            var lessons = new List<Lesson>
            {
                new Lesson(1, "Introduction to Programming", "http://example.com/deck1", TimeSpan.FromHours(1)),
                new Lesson(2, "Data Structures and Algorithms", "http://example.com/deck2", TimeSpan.FromHours(2)),
                new Lesson(3, "Web Development Basics", "http://example.com/deck3", TimeSpan.FromHours(3))
            };
        

        var lessonViewModels = lessons.Select(lesson => new LessonViewModel
        {
            Id = lesson.Id,
            Name = lesson.Name,
            CardDeckLink = lesson.CardDeckLink,
            TimeEstimation = lesson.TimeEstimation
        }).ToList();

        var viewModel = new TeachingPlanViewModel
        {
            Lessons = lessonViewModels
        };

            return View(viewModel);
    }
}
}

Nun muss ich noch eine view anlegen. Ich möchte bootstrap benutzen, dazu habe ich mir die files gedownloadet und die css Dateien in den bootstrap Ordner in /Views/boostrap gespeichert. Nun habe ich ich in dem Ordner /Views/TeachingPlan einen neue index.cshtml angelegt, diese sieht folgendermaßen aus:

model Test.Models.TeachingPlanViewModel

<html>
<head>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <a class="navbar-brand" href="#">SoPro24-Team01</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02"
                aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
                <li class="nav-item active">
                    <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Studium</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Lehrplan</a>
                </li>
            </ul>
        </div>
    </nav>

    
</body>
</html>

Ich möchte, dass erstmal nur das Menü angezeigt wird, später möchte ich die Lessons angezeigt haben in einem grid, aber das gehört nicht zu dieser Frage.

Mein Problem ist gerade, dass ich das Projekt so nicht ausführen kann. Ich habe eine andere Vorlage genommen als Grundlage. Daher kommen die Dateien wie „HomeController“ usw.

Die Programm.cs Datei sieht folgendermaßen aus:

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Home/Error");
    // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
    app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Home}/{action=Index}/{id?}");

app.Run();

die gehören in wwwroot, da müssten sie glaube eh schon legen wenn du das standard Template benutzt hast

was ist denn dein Fehler?