title: SMO Equivalent to SET HADR OFF
body: <p>In SMO (C#), what is the equivalent to...</p>
  
  <pre><code>ALTER DATABASE db SET HADR OFF;
  </code></pre>
  
  <p>I've looked in the documentation for both the Database and AvailabilityDatabase classes and nothing is really jumping out at me.</p>
  
  <p>The end goal here is to drop a database that is a member of an Availability Group. Currently, we are doing this by first turning HADR off and then dropping the database on all secondary servers, and then, on the primary server, removing the database from the Availability Group and dropping the database there.</p>