Default Persistence Server


By default CodeFluent Entities uses the following connection string:

Application Name=[DefaultNamespace];server=[DefaultPersistenceServer];database=[DefaultNamespace];Integrated Security=true

Where [DefaultNamespace] is the default namespace of your CodeFluent Entities project, and [DefaultPersistenceServer] the default persistence server. By default, the default persistence server is configured to be 127.0.0.1.

Of course, you can override the default connection string at the project level thanks to the Default Connection String property (defaultConnectionString attribute in XML):

image

Or at the producer level by specifying its connection string explicitly:

image

However, to keep your model as portable as possible the best practice is definitely that each developer sets his default persistence server to their server. To set this up, you need to:

  • run Visual Studio with administrator privileges,
  • get in Tools > Options… > CodeFluent Entities,
  • in the advanced tab of the property grid (click the button with the yellow plus sign to access it), set the Default Persistence Server property to your server.

image

Doing this ensures the default connection string used by CodeFluent Entities is valid. As a consequence, developers won’t have to override the default connection string in their models anymore, and this way a model can easily be shared between one another.

Carl

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s