public async Task <ActionResult> AddTeacherSubject([FromForm] TeacherSubjects teacherSubject)
        {
            if (!ModelState.IsValid)
            {
                ModelState.AddModelError("ErrorMessage:", "You unAuthorize to Get Data of this Teacher");
                return(BadRequest(ModelState));
            }
            var identity = User.Identity as ClaimsIdentity;

            if (identity == null)
            {
                ModelState.AddModelError("ErrorMessage:", "You are not Authanticated");
                return(BadRequest(ModelState));
            }
            IEnumerable <Claim> claims = identity.Claims;
            var teacherId = claims.Where(p => p.Type == "TeacherId").FirstOrDefault()?.Value;

            if (teacherId == null)
            {
                ModelState.AddModelError("ErrorMessage:", "You are not Authanticated");
                return(BadRequest(ModelState));
            }
            await _teacherSubjectRepository.AddTeacherSubject(teacherSubject);

            return(Created("TeacherSubjectTable", teacherSubject));
        }
 // remove TeacherSubject
 public async Task DeleteTeacherSubject(TeacherSubjects teacherSubject)
 {
     _context.TeacherSubjects.Remove(teacherSubject);
     await _context.SaveChangesAsync();
 }
        // Add new TeacherSubject
        public async Task AddTeacherSubject(TeacherSubjects teacherSubject)
        {
            await _context.TeacherSubjects.AddAsync(teacherSubject);

            await _context.SaveChangesAsync();
        }