Пример #1
0
        public void Put(int id, [FromBody] StudentClassGrade value)
        {
            var scg = _repo.StudentClassGrades.GetStudentClassGrade(id);

            scg.Grade = value.Grade;
            _repo.Save();
        }
Пример #2
0
        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();
        }