So I am currently trying to create a counsellor appointment booking system using ASP.NET Razor pages. I have 2 models so far, Counsellor and Schedule which have been created as follows:
I am now trying to create a schedule for a counsellor, where the counsellor name is selected from a drop down list containing all counsellors in the database. However, when I try to create the schedule I receive an error saying I cannot insert the value NULL into column Description. So I think it is trying to create a new counsellor object when I try to create the Schedule.
Here is my index.cshtml page and my index.cshtml.cs page for the schedule model
This is my create.cshtml and create.cshtml.cs pages also for schedule model:
Lastly I show the database table designers for both counsellors and schedules:
If anyone can assist, i just want to retrieve counsellor name when creating the schedule.For some reason it is like it is trying to create a new counsellor object so it gives me an error saying i cannot enter the value into the description column.
![ASP.NET Razor pages data linking [closed]](https://file.115kc.com/storage/eg/image82.jpg)