Ejemplo n.º 1
0
 public bool Delete([FromUri] string token, [FromUri] long id)
 {
     _conn = new Connection(_connectionString);
     try
     {
         _conn.OpenConnection();
         return !string.IsNullOrEmpty(_conn.GetUsernameByToken(token)) && _conn.DeleteDocument(id);
     }
     finally
     {
         _conn.CloseConnection();
     }
 }