I have five tables for school (for example) and I use Entity Framework.
for example I want to get "Book Name" of one record of exam.
in "1": I must Join "Exam" and "Teach" and "Book" to get name of Book.
int "2": I must Join "Exam" and "Book" to get name of Book. with 2 "Join" But we have redundancy.
which one is better? 1 or 2?
and another question:
in "2"
"Join" is better or using this?
First Step: I get BookId from ExamTable.
Second Step: I get BookName from BookTable by BookId
int BookId = db.Exams.Where(w => w.ExamId == 23).SingleOrDefault().BookId;
string BookName = db.Books.Where(w => w.BookId == BookId).SingleOrDefault().BookName;