Example #1
0
    public object Delete(int id)
    {
        Dictionary <string, object> retorno = new Dictionary <string, object>();

        try
        {
            service.Delete(id);
            retorno.Add("success", true);
            return(Request.CreateResponse(HttpStatusCode.OK, retorno));
        }
        catch (Exception)
        {
            retorno.Add("success", false);
            return(Request.CreateResponse(HttpStatusCode.InternalServerError, retorno));
        }
    }