Beispiel #1
0
        public HttpResponseMessage Create(HttpRequestMessage request, SystemConfigModel SystemConfigModel)
        {
            return(CreateHttpResponse(request, () =>
            {
                var a = request.CreateResponse(HttpStatusCode.BadRequest, ModelState);
                HttpResponseMessage response = null;
                if (!ModelState.IsValid)
                {
                    response = request.CreateResponse(HttpStatusCode.BadRequest, ModelState);
                }
                else
                {
                    var SystemConfigService = new SystemConfigService();
                    SystemConfigService.Create(SystemConfigModel);
                    //var responseData = true;
                    response = request.CreateResponse(HttpStatusCode.OK);
                }

                return response;
            }));
        }