Freigeben über


Why am I asked to enter the connection string information for the database every time a connect a new application to an external database?

A database type is designed to be hosted on a Database Server in the host layer. Therefore, it represents the Database and not the database connection string. It is used for documentation purposes. It is used to document the existence of a Database, the connections to that database from the various Database consumer endpoints, and that a database is hosted on a particular Database Server. Therefore, using this model, you can document that two ConnectionStrings (that connect in different ways) use the same Database.

The Database consumer endpoint represents the ConnectionString because the connection string information is stored within the Web/Win Application. Therefore, if you want to use the same ConnectionString, I recommend that you copy/paste the database consumer endpoint.

We investigated what it would take to create a Database component that stored the information required to create a valid generic ConnectionString based on the properties of the database by default. However, we decided against this, as it would require us to make assumptions about the data provider (e.g. SQL Server, Oracle).

We decided that we would leave this as an exercise for V2, where we plan to offer specific database types in order to give a richer experience over Database relationships.

Comments