public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Address,Sex,ApplicationUserId")] Student student)
        {
            if (ModelState.IsValid)
            {
                db.Entry(student).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Profile"));
            }
            ViewBag.ApplicationUserId = new SelectList(db.Users, "Id", "Email", student.ApplicationUserId);
            return(View(student));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Id,Name,MobileNumber,Email,DepartmentId,ApplicationUserId")] Teacher teacher)
        {
            if (ModelState.IsValid)
            {
                db.Entry(teacher).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.ApplicationUserId = new SelectList(db.Users, "Id", "Email", teacher.ApplicationUserId);
            ViewBag.DepartmentId      = new SelectList(db.Departments, "Id", "Name", teacher.DepartmentId);
            return(View(teacher));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Id,StudentId,DepartmentId,AboutYou")] ApplicationForm applicationForm)
        {
            if (ModelState.IsValid)
            {
                db.Entry(applicationForm).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.DepartmentId = new SelectList(db.Departments, "Id", "Name", applicationForm.DepartmentId);
            ViewBag.StudentId    = new SelectList(db.Students, "Id", "Name", applicationForm.StudentId);
            return(View(applicationForm));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Id,Name,DepartmentId")] Course course)
        {
            if (ModelState.IsValid)
            {
                db.Entry(course).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.DepartmentId = new SelectList(db.Departments, "Id", "Name", course.DepartmentId);

            return(View(course));
        }