public async Task <IActionResult> AddClassSection(ClassSectionDtoForAdd classSection) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (await _repo.ClassSectionExists(classSection.SectionId, classSection.ClassId, classSection.SemesterId)) { return(BadRequest(new { message = "Class Section Already Exist" })); } _response = await _repo.AddClassSectionMapping(classSection); return(Ok(_response)); }