Exemplo n.º 1
0
        public IHttpActionResult Post(Line line)
        {
            IHttpActionResult result  = null;
            LineService       service = new LineService();
            Line newLine = service.InsertLine(line);

            if (newLine != null)
            {
                result = Created <Line>(Request.RequestUri + newLine.Id.ToString(), newLine);
            }
            else
            {
                result = NotFound();
            }

            return(result);
        }