public IActionResult PromoteStudents(string study, int semester)
        {
            var r = _db.PromoteStudent(study, semester);

            if (r != null)
            {
                return(Ok(r));
            }
            else
            {
                return(BadRequest("Semester or study does not exists!"));
            }
        }
Esempio n. 2
0
        public IActionResult PromoteStudents(PromoteRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest("Data not delivered"));
            }

            var result = service.PromoteStudent(request.Semester, request.Studies);

            if (result != null)
            {
                return(Ok(result));
            }
            else

            {
                return(BadRequest("bad request"));
            }
        }