Can I stop the dbml designer from adding a connection string to the dbml file? [duplicate]

While in the designer for the DBML, you can right-click on any white-space, and click on Properties (not the same as right-clicking on the DBML file and clicking Properties).
From there, expand the “Connection” option. Set “Application Settings” to False and clear out the “Connection String” setting. These settings are what the designer uses to create that default constructor.

From there, you can use the default constructor you’ve created outside of the designer.cs file. Unfortunately, you’ll have to repeat this process everytime you add any new tables to the designer. It’s annoying, and I feel your pain.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)