title: Generating separate "model" classes from a WCF service
body: <p>I'd like to be able to generate individual classes (one class per file) for each Data Contract or XML type in a WCF Web Service.</p>
  
  <p>I've read the <a href="http://msdn.microsoft.com/en-us/library/aa347733.aspx" rel="noreferrer">svcutil</a> documentation, and unless I skimmed a little too fast, it doesn't look like the tool supports this behaviour.</p>
  
  <p>The reason I want to do this is simple - I'm trying to isolate the service's "model" from the service itself.  There are several components that rely on types from the service, but don't care about the details of service-level operations such as loading/saving.  I don't like the fact that these components need to take on dependencies to the same assembly that contains all sorts of invocation and binding logic.</p>
  
  <p>I know that <code>svcutil</code> (and the VS integration) can be configured to use pre-existing model classes in another assembly.  This is a chicken-and-egg problem though; I don't really want to have to write 50 classes by hand that are (at least for now) almost identical to the generated classes.  And of course I have to add all the <code>DataContract</code> attributes with namespaces and other WCF attributes... it's a pain.</p>
  
  <p>My ultimate aim is to actually have a presentation/domain model that's completely independent of the service model, but I don't really have the cycles for that yet.  I think that generating a faux-model that can eventually be molded into a genuine presentation model would be a good, quick and easy way to start down this path.  After that, I can configure the service references to use the separately-generated proxy classes and begin fleshing out something more robust.</p>
  
  <p>Can this be done?  Are there options for <code>svcutil</code> that will get it to generate one class per file?  Or is there another tool that can do it?</p>