%APPDATA% in connection string is not substituted for the actual folder?

后端 未结 3 1054
别那么骄傲
别那么骄傲 2020-12-06 06:29

When using WPF and entity-framework I have an APP.CONFIG that looks like the following:




        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-06 07:13

    I have another option. We don't need to replace anything. I am using below connection string without any replace and it's working fine.

    
        
      
    

    Main change is data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|\ProjectManagementDB.mdf;integrated security=True;

    I hope this will save someone.

提交回复
热议问题