Exemplo n.º 1
0
 public IHttpActionResult Delete([FromBody] Input value)
 {
     try
     {
         if (value == null || value.key == null)
         {
             return(BadRequest());
         }
         else
         {
             if (_keyValueCache.Delete(value.key))
             {
                 return(Ok(new JObject(
                               new JProperty("success", true)
                               )));
             }
             else
             {
                 return(Ok(new JObject(
                               new JProperty("success", false)
                               )));
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("CacheController.Delete " + ex);
         return(InternalServerError());
     }
 }