public async Task <ActionResult <Lesson_score> > PostLesson_score(Lesson_score lesson_score) { _context.Lesson_scores.Add(lesson_score); await _context.SaveChangesAsync(); return(CreatedAtAction("GetLesson_score", new { id = lesson_score.Id }, lesson_score)); }
public async Task <IActionResult> PutLesson_score(Guid id, Lesson_score lesson_score) { if (id != lesson_score.Id) { return(BadRequest()); } _context.Entry(lesson_score).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Lesson_scoreExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }