title: Designing web service calls that read/write from database
body: <p>Apologies for the newbie web service question - </p>
  
  <p>I am trying to create a webservice that has a list of methods to perform read/writes to a database. An example function will be of form  - </p>
  
  <pre><code>CreateNewEmployee(string username, string employeeid, string deptname)
  </code></pre>
  
  <p>I created a webservice in .net (asmx) that has the above mentioned webmethod. In that, I open the connection to the data base and do an insert in to the database and then close the connections. Is this the right way to design the web service call? </p>
  
  <p>Should I instead be passing an object instead of multiple parameters?</p>
  
  <p>Any pointers toward best practices when trying to create a webservice that writes data into a database?</p>
  
  <p>To add some more information </p>
  
  <ul>
  <li>We would like to have web services since it might be reused by many different applications within the organization (both web and desktop).<br>
  We are also planning to create an environment where users can use these web services to create data mashups. </li>
  </ul>
  
  <p>Thanks, 
  Nate</p>