public async Task <IActionResult> Edit(int id, [Bind("ClassId,ClassName,ClassCode,GroupMail,StartDate,EndDate,Location,DetailLocation,Status,Remarks,AuditTrail,isDeleted")] ClassBatch classBatch)
        {
            if (id != classBatch.ClassId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(classBatch);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ClassBatchExists(classBatch.ClassId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(classBatch));
        }
        public async Task <IActionResult> Create([Bind("ClassId,ClassName,ClassCode,GroupMail,StartDate,EndDate,Location,DetailLocation,Status,Remarks,AuditTrail,isDeleted")] ClassBatch classBatch)
        {
            if (ModelState.IsValid)
            {
                _context.Add(classBatch);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(classBatch));
        }