Asp.net + SQLite 部署

Asp.net有一个App_Data目录,默认可以把SQLite的数据库文件放在该目录,然后连接字符串写成如下:

<connectionStrings>  
  <add name="MenuStoreEntities"  
       connectionString="Data Source =|DataDirectory|\Database.db"  
       providerName="System.Data.SQLite"/>  
</connectionStrings>  

主要看{|DataDirectory|}这个东西,在Asp.net中,默认会解析成App_Data目录

posted @ 2014-03-14 15:55  liuhz  阅读(501)  评论(0编辑  收藏  举报