Beispiel #1
0
        public HttpResponseMessage Delete(HttpRequestMessage request, int id)
        {
            return(CreateHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;
                if (!ModelState.IsValid)
                {
                    response = request.CreateResponse(HttpStatusCode.BadRequest, ModelState);
                }
                else
                {
                    var SystemConfigService = new SystemConfigService();
                    SystemConfigService.Deleteone(id);
                    response = request.CreateResponse(HttpStatusCode.OK);
                }

                return response;
            }));
        }