Example #1
0
        // GET api/<controller>
        public IHttpActionResult Get()
        {
            IHttpActionResult  result  = null;
            TermService        service = new TermService();
            IEnumerable <Term> terms   = service.GetTerms();

            if (terms.Count() > 0)
            {
                result = Ok(terms);
            }
            else
            {
                result = NotFound();
            }
            return(result);
        }