title: Adding multiple content databases to Sharepoint
body: <p>I am trying to create a new web application in Web service. I am using this code to do this.</p>
  
  <pre><code>        SPWebApplicationBuilder webAppBuilder = new SPWebApplicationBuilder(SPFarm.Local);
          webAppBuilder.Port = port;
          webAppBuilder.RootDirectory = new System.IO.DirectoryInfo(@"C:\Inetpub\wwwroot\wss\VirtualDirectories\" + port);
          webAppBuilder.CreateNewDatabase = true;
          webAppBuilder.DatabaseName = "WSS_Content_00000000000000000000000000000000";
          SPWebApplication newWebApplication = webAppBuilder.Create();
          newWebApplication.Provision();
  </code></pre>
  
  <p>Now I wand to add a new content database to the same web application. According to my understanding I can use this to do it.</p>
  
  <pre><code>newWebApplication.ContentDatabases.Add(new SPContentDatabase());
  </code></pre>
  
  <p>The new operator should create a new content database instance this is not successful. (NullReferenceException). And the IDE suggests me to use new operator even I already use it.</p>
  
  <p>Any idea on this? Any reference on adding multiple content databases?</p>