예제 #1
0
        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());
        }
예제 #2
0
        // GET: Recommend
        public ActionResult Index()
        {
            recoomendSuperclass = new RecoomendSuperclass();
            //List<StudentAccomodation> studentAccomodat = new List<StudentAccomodation>();

            recoomendSuperclass.studentAccomodations = db.StudentAccomodation.Take(10).ToList();
            //
            return(View(recoomendSuperclass));
        }