public void Put(int id, [FromBody] StudentClassGrade value) { var scg = _repo.StudentClassGrades.GetStudentClassGrade(id); scg.Grade = value.Grade; _repo.Save(); }
public void Post([FromBody] StudentClassGrade value) { var newStudentClassGrade = new StudentClassGrade { StudentId = value.StudentId, ClassId = value.ClassId, Grade = value.Grade }; _repo.StudentClassGrades.Create(newStudentClassGrade); _repo.Save(); }