Esempio n. 1
0
        public IHttpActionResult DeleteGrade(int id)
        {
            Grade grade = gradesService.DeleteGrade(id);

            if (grade == null)
            {
                return(NotFound());
            }

            return(Ok(grade));
        }
Esempio n. 2
0
        public IHttpActionResult DeleteGrade(int id)
        {
            try
            {
                GradeDTO retVal = service.DeleteGrade(id);

                logger.Info("Admin deleted grade");
                return(Ok(retVal));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }