public async Task <ActionResult <StudentTopics> > PostStudentTopics(StudentTopics studentTopics) { _context.StudentTopics.Add(studentTopics); await _context.SaveChangesAsync(); return(CreatedAtAction("GetStudentTopics", new { id = studentTopics.studentTopicId }, studentTopics)); }
public async Task <IActionResult> PutStudentTopics(int id, StudentTopics studentTopics) { if (id != studentTopics.studentTopicId) { return(BadRequest()); } _context.Entry(studentTopics).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StudentTopicsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public void UpdateStudentTopic(StudentTopics studentTopics) { throw new NotImplementedException(); }