Example #1
0
        public HttpResponseMessage Save([FromBody] DVlogePravice dVlogePravice)
        {
            CRUDService         service  = new CRUDService();
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK);
            Entities            db       = new Entities();

            try
            {
                service.Save(CRUDService.ParsePravice(dVlogePravice), db.Pravices, dVlogePravice.PravicaKLJ);
            }
            catch (ApplicationException ex)
            {
                response = Request.CreateResponse(HttpStatusCode.InternalServerError, ex);
            }


            return(response);
        }