// GET: Students
 public ActionResult Index()
 {
     try
     {
         Attendance1 attendance = new Attendance1();
         attendance.IdAttendance = DateTime.Today;
         db.Attendance1.Add(attendance);
         db.SaveChanges();
         return(View(db.Students.ToList()));
     }
     catch (Exception)
     {
         return(View(db.Students.ToList()));
     }
 }
 public ActionResult CreateAttedance([Bind(Include = "IdAttendance")] Attendance1 attendance1)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Attendance1.Add(attendance1);
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
     }
     catch {
         return(RedirectToAction("Index"));
     }
     return(RedirectToAction("Index"));
 }