two tables in code first convention:
Doctor
Weekdays
That is one doctor can have Many weekdays but a weekday belongs to one doctor
So i put a ICollection of Weekdays in Doctor class and a foreign key in Weekday class.
When i want to access doctor name in dbcontext, i do this way:
Mydbcontext.Weekday.doctor.fullname
But i got an error and i can't navigate to doctor table
What is the possible mistake I've done?
Hey, send the error message here but, you can check Lazy loading and be sure the Doctor information is loaded ( if it's not loaded, you would get Object reference error)
Обсуждают сегодня