public async Task <IActionResult> updateChapterProject(ChapterProject chapterProject) { try { await _teacherService.updateChapterProject(chapterProject); return(Ok()); } catch (AppException ex) { return(BadRequest(new { message = ex.Message })); } }
public async Task updateChapterProject(ChapterProject chapterProject) { _context.Update(chapterProject); await _context.SaveChangesAsync(); }
public async Task CreateChapterProject(ChapterProject chapterProject) { _context.Add(chapterProject); await _context.SaveChangesAsync(); }