public RedirectToRouteResult AddNewSchool(School school)
        {
            UsersContext.Schools.InsertOnSubmit(school);
            UsersContext.SubmitChanges();

            ViewBag.SchoolList = CreateSchoolDetails(UsersContext.Schools);
            return RedirectToAction("Index", "Settings");
        }
        public RedirectToRouteResult EditSchool(School newSchool)
        {
            var schoolToUpdate = UsersContext.Schools.First(id => id.SchoolId == newSchool.SchoolId);
            schoolToUpdate.SchoolName = newSchool.SchoolName;
            schoolToUpdate.Details = newSchool.Details;
            UsersContext.SubmitChanges();

            return RedirectToAction("Index", "Settings");
        }
partial         void UpdateSchool(School instance)
        {
            ExecuteDynamicUpdate(instance);
        }
partial         void InsertSchool(School instance)
        {
            if (!Schools.Contains(instance))
                this.ExecuteDynamicInsert(instance);
        }
partial         void DeleteSchool(School instance)
        {
            ExecuteDynamicDelete(instance);
        }
 partial void DeleteSchool(School instance);
 partial void UpdateSchool(School instance);
 partial void InsertSchool(School instance);