Beispiel #1
0
        public ActionResult AddPreference(string studentId, int companyId)
        {
            List <Company> preferences = preferencesDAL.GetPreferredCompaniesByStudentId(studentId);

            if (!preferences.Select(p => p.Id).Contains(companyId))
            {
                preferencesDAL.AddCompanyPreference(studentId, companyId, preferences.Count + 1);
            }


            return(RedirectToAction("Preferences", new { id = studentId }));
        }