VS2010 + Entity Framework 4: what does the "DataDirectory" mean in the connectionstrings?


  • In VS2010, we generate a entity data model base on SQL server compact edtion database (~.sdf). After generate the entity data model, we notice that the connection string in the App.config contains "DataDirectory" (see the attach code with underline), we search the whole solution does not find where it gets define? It looks like it is a relative path.

    Does anyone know what "DataDirectory" means?


      <add name="OptimaEntities" connectionString="metadata=res://*/EntityDataModel.csdl|res://*/EntityDataModel.ssdl|res://*/EntityDataModel.msl;provider=System.Data.SqlServerCe.3.5;provider connection string=&quot;Data Source=|DataDirectory|\test.sdf;Password=ttt#1;Persist Security Info=True&quot;" providerName="System.Data.EntityClient" />
    Wednesday, August 04, 2010 4:21 PM


All replies