title: Using backup database programmatically
body: <p>How can I use a .bak database backup file (backed up via a query in <a href="http://en.wikipedia.org/wiki/Microsoft_SQL_Server" rel="nofollow">SQL&nbsp;Server</a>) programmatically?</p>
  
  <p>I want my application to back up my database to a location (which I can already do) and I also want it to be able to load a backed up database (the .bak file).</p>
  
  <p>How can I do this using C#?</p>