假设我想发布Windows Forms应用程序以进行生产。我希望其中的数据受到密码保护,该应用使用本地数据库保存数据:
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=C:\Users\Marco\Documents\visual studio 2017\Projects\ProjectName\ProjectName\db\aspnet-dbname-20180717114015.mdf;User Id=Username;Password=examplepassword;Initial Catalog=aspnet-dbname-20180717114015;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />