title: Is it Safe? Storing database access method in library
body: <p>First, I have two project working on: ASP.NET and Silverlight
  Both uses a class (QueryServiceClass in a library class project) that have query methods to access the database with ADO.NET, manipulating the database. (open connection to database, add customer, edit, update etc.)</p>
  
  <p>So I stored them into a C# Class library and it shared with ASP.Net and Silverlight.
  ASP.NET project and Silverlight's Web project  will have a reference to the QueryServiceClass project.</p>
  
  <p>But then if I publish the ASP.NET/Silverlight Project, the QueryServiceClass project's dll file should also be published ( the dll should be locate in the server side at this point).</p>
  
  <p>Because the QueryServiceClass's method has to be public so ASP.NET/Silverlight project can use it.
  So someone might able to use that dll to access the database? Would that be safe?</p>
  
  <p>======
  Edit</p>
  
  <p>In the Silverlight's Web Project, I am using WCF inhert the QueryServiceClass and an Interface to access the database, so on Silverlight Client, it will access the database through the WCF.
  I am more concern on someone might take the dll file from the server and give to someone.</p>
  
  <p>Thanks in advance.</p>
  
  <p>King</p>