public HttpResponseMessage Delete(short id)
        {
            Spartan_Object_Method_Status varSpartan_Object_Method_Status = this.service.GetByKey(id, false);
            bool result = false;

            if (varSpartan_Object_Method_Status == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound));
            }

            try
            {
                result = this.service.Delete(id);//, globalData, dataReference);
            }
            catch (ServiceException ex)
            {
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
            }

            return(Request.CreateResponse(HttpStatusCode.OK, result));
        }
        public HttpResponseMessage Put(short id, Spartan_Object_Method_Status varSpartan_Object_Method_Status)
        {
            if (ModelState.IsValid && id == varSpartan_Object_Method_Status.Object_Method_Status_Id)
            {
                var data = -1;
                try
                {
                    data = this.service.Update(varSpartan_Object_Method_Status);//, globalData, dataReference);
                }
                catch (ServiceException ex)
                {
                    return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
                }

                return(Request.CreateResponse(HttpStatusCode.OK, data, Configuration.Formatters.JsonFormatter));
            }
            else
            {
                var errors = ModelState.Values.SelectMany(v => v.Errors).Select(error => error.ErrorMessage);
                return(Request.CreateResponse(HttpStatusCode.BadRequest, errors));
            }
        }