Exemplo n.º 1
0
        public IHttpActionResult Post(Term term)
        {
            IHttpActionResult result  = null;
            TermService       service = new TermService();
            Term newTerm = service.InsertTerm(term);

            if (newTerm != null)
            {
                result = Created <Term>(Request.RequestUri + newTerm.ID.ToString(), newTerm);
            }
            else
            {
                result = NotFound();
            }

            return(result);
        }