title: How to store objects data into database from OOP application efficiently and easily?
body: <p>I design an objected oriented application using C# with database back end, for some time I was building same application using procedural way in which I feel storing data to database is little bit easier using simple SQL statement. 
  I my application I want to store the objects attribute to database, for example for an item object </p>
  
  <pre><code>    Class Item {
   private string itemId;
  
  private string itemname;
  
  private Invoice inv;  //assume Invoice object
  
  //method
  
  public bool storetodb() {
  
  //..something like this
  }
  }
  </code></pre>
  
  <p>The problem is I feel a little bit complex when storing and retrieving object data to database. When I searched on some resource also they use like collection class to map between object on the application and relational database. Even I have searched SO but I couldn't find any related information. One source I got was</p>
  
  <ul>
  <li><a href="http://www.codeproject.com/KB/database/AONETOOP.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/database/AONETOOP.aspx</a>  ..... The author uses collection to store and retrieve data</li>
  <li>I hear also about ORM technology although I have never tried it.</li>
  </ul>
  
  <p>So what is good practice for designing these types of applications? 
  can you give any links, article,  recommended book or response for tackling these types of problem.</p>
  
  <p>Thanks </p>
  
  <p><strong>Update</strong></p>
  
  <p>It seems ORM tools mainly nhibernate is most promising from your suggestion.
  Thanks all of for your help, I will consider ORM </p>