コード例 #1
0
        public HttpResponseMessage Post(LinksModel model)
        {
            try
            {
                LinksService svc = new LinksService();
                int          res = svc.Create(model);

                return(Request.CreateResponse(HttpStatusCode.OK, res));
            }
            catch (System.Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
            }
        }