public ActionResult ViewAccomo(int ViewId) { StudentAccomodation accomodationStud; List <Rater> rater; RecoomendSuperclass recmSuper; try { accomodationStud = new StudentAccomodation(); rater = new List <Rater>(); recmSuper = new RecoomendSuperclass(); accomodationStud = db.StudentAccomodation.Where(c => c.Id == ViewId).FirstOrDefault(); rater = db.Rater.Where(c => c.StudentAccomodationId == accomodationStud.Id).ToList(); accomodationStud.Rater = rater; return(View(accomodationStud)); }catch (Exception e) { } return(View()); }
// GET: Recommend public ActionResult Index() { recoomendSuperclass = new RecoomendSuperclass(); //List<StudentAccomodation> studentAccomodat = new List<StudentAccomodation>(); recoomendSuperclass.studentAccomodations = db.StudentAccomodation.Take(10).ToList(); // return(View(recoomendSuperclass)); }