title: EF 5 Conditional Mapping
body: <p>I'm using EF 5 Database first approach in my MVC application. all of my tables uses a Field called Deleted which is a boolean field to mark a record is deleted. </p>
  
  <p>I'm trying to get rid of the requirement of having to check Deleted == false every time I query my database. The very straightforward way of doing this is to use a conditional mapping in the edmx file where EF always return data that are not deleted. That's all good.</p>
  
  <p>But the problem of doing this condition mapping is that, when I want to allow the user to delete some record for e.g Address from their address book I don't have access to Delete field from EF as I used it in the conditional mapping and therefore I have to look for another option to allow user to delete a record.</p>
  
  <p>The way I thought is to create a stored proc that handle the delete query and call it when I want to delete the record. </p>
  
  <p>Is there a better way of doing this? Is it possible to make the Delete field accessible even it is used in the conditional mapping?</p>