title: Unit testing C# database dependent code
body: <p>I would like to create unit tests for data dependent code. For example:</p>
  
  <p>A user class that has the usual create, update &amp; delete.</p>
  
  <p>If I wanted to create a test for "user already exists" scenario, or and update or delete test. I would need to know that a specific user already exists in my database.</p>
  
  <p>In such cases, what would be the best approach to have stand alone tests for these operations that can run in any order?</p>