"Create business entities from database" dependency on Tests?

Topics: General Discussion Forum
Jun 25, 2007 at 9:34 PM
While creating my first 'serious' web service, I got to the point where I have to use the "Create business entities from database" recipe. It will point to a data connection and then a data base and table.

The first interesting point is that it uses a test project: "\Tests\C:\WSSF-HOL\scWCFwo\scWCFwo\Tests\scWCFwo.Host\" or so... the other is that it doesn't recognize any connection from any of the services projects. As a matter of fact, it takes the connections from the test project. That seems strange because those test won't be deployed later at running time.

Finally, although the help message says: " Specify a connection for your database. You can choose an existing connection or create a new one." It doesn't allow me to point to any new database or connection string.

I checked against the hands on lib, excersice 5 and it also depends on the test projects to create the connection.

The question then, is: Am I missing something here? I don't know if configuring based on the test string is the best idea.

Also, how can I make the recipe to point to connections in the other projects of the factory, specifically, wouldn't be better to take the connections and schema from the datacontracts or wherever I configured my connections?

Thanks in advance...


Miguel Delgado

Jun 25, 2007 at 10:11 PM
Please, dismiss that last. My project didn't have a host and thus, the only valid connections where those in the test projects.

The only question is why the guidance doesn't create a host from the begining? But that can wait...

Thanks
Miguel Delgado


dmzone wrote:
While creating my first 'serious' web service, I got to the point where I have to use the "Create business entities from database" recipe. It will point to a data connection and then a data base and table.

The first interesting point is that it uses a test project: "\Tests\C:\WSSF-HOL\scWCFwo\scWCFwo\Tests\scWCFwo.Host\" or so... the other is that it doesn't recognize any connection from any of the services projects. As a matter of fact, it takes the connections from the test project. That seems strange because those test won't be deployed later at running time.

Finally, although the help message says: " Specify a connection for your database. You can choose an existing connection or create a new one." It doesn't allow me to point to any new database or connection string.

I checked against the hands on lib, excersice 5 and it also depends on the test projects to create the connection.

The question then, is: Am I missing something here? I don't know if configuring based on the test string is the best idea.

Also, how can I make the recipe to point to connections in the other projects of the factory, specifically, wouldn't be better to take the connections and schema from the datacontracts or wherever I configured my connections?

Thanks in advance...


Miguel Delgado



Jun 25, 2007 at 11:58 PM
Hi Miguel,

The guidance actually creates a test Host project as you already noticed. There is no much value in creating another kind of host project since your actual implementation may be likely hosted in IIS (production) or other similar web file host for dev/test purposes, that is the current guidance.
I'm glad you realized how to set the host project responsability or add your own host project.