Ejemplo n.º 1
0
        public IActionResult Promote(PromoteStudentRequest request)
        {
            var response = _service.Promote(_context, request);

            if (response.studentResponse == null)
            {
                switch (response.Error)
                {
                case "No such record in Enrollment":
                    return(NotFound("No such record in Enrollment"));

                default:
                    return(StatusCode(400));
                }
            }
            else
            {
                return(CreatedAtAction(nameof(EnrollStudent), response.studentResponse));
            }
        }
Ejemplo n.º 2
0
 public IActionResult Promotion(Promotion promotion)
 {
     return(_service.Promote(promotion.Semester, promotion.Studies));
 }
Ejemplo n.º 3
0
        public IActionResult Promotion(Promotion promotion)

        {
            return(_service.Promote(promotion));
        }