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):
Or at the producer level by specifying its connection string explicitly:
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.
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.