title: Repository Pattern for node.js using mongoose
body: <p>I am a newbie to node.js, coming from a .net background.  I would like to use some of the design patterns I used with c#.net.  I am running into a few complications however, due to the differences in object oriented nature between c# and JavaScript. </p>
  
  <p>In particular, I would like to implement the repository pattern but have not been able to find a lot of examples doing this with node.  The way JavaScript and mongoose are set up are making it a little hard to wrap my mind around this one.</p>
  
  <p>I was referred to the following url for an example <a href="https://github.com/iainjmitchell/mongorepositiory" rel="noreferrer">https://github.com/iainjmitchell/mongorepositiory</a>, I could be wrong, but I do not see where this example allows for you to pass callbacks that would allow your code to handle any errors that may arise after the db call is made as opposed to how it is ordinarily done using mongoose. </p>