title: How to move SQL Server database (localdb) from one machine to another programmatically
body: <p>As per the below reference document, I am looking to move a SQL Server Express database (localdb created within vs2013).</p>
  
  <p><a href="https://stackoverflow.com/questions/18371902/how-can-i-move-a-sql-server-localdb-database-from-one-machine-to-another">How to move a localdb from one machine to another manually</a></p>
  
  <p>However the operation needs to be entirely automated from within my wpf c# application.</p>
  
  <p>What I want to achieve is (updated):</p>
  
  <ol>
  <li><p>Initial Application implementation (Currently most important) -> </p>
  
  <p>The database needs to be installed / copied to a users machine when the application is installed, ideally the database needs to be packaged in a zip or installer file, so it can be easily transferred to the users machine when installing the application, or I'm open to any better ideas?</p></li>
  <li><p>Keeping it upto date -> The application needs to be able to export and import data from the localdb to a sql database file on a local network share. This may require merging of data.</p></li>
  </ol>
  
  <p>Whether it be done via c# code or sql script (if script please advise how to run a script from c#) How could one <strong>best</strong> achieve this?</p>
  
  <p>Thanks for your help in advance!</p>