Esempio n. 1
0
        public IHttpActionResult GetAllTeachersBySubjectName([FromUri] string subjectName)
        {
            try
            {
                var retVal = service.GetAllBySubjectName(subjectName);

                logger.Info("Returning all teachers teaching any subjects with name  containing \"{0}\"", subjectName);
                return(Ok(retVal));
            }
            catch (Exception e)
            {
                logger.Warn("Caught exception with message {0}", e.Message);
                return(NotFound());
            }
        }