This project has moved. For the latest updates, please go here.

In the main application that reference DAL Project you have to set your Connection String.

So you add/modify your web.config(for web project) or app.config (for desktop or console project) and add in the ConnectionString section a code similar to:

 
<connectionStrings>
   <add name="ConnectionString" connectionString="Data Source=localhost\sqlexpress;Initial Catalog=myDb;MultipleActiveResultSets=true;User Id=sa;Password=pwd;Encrypt=false;Packet Size=4096;Connection Timeout=10;"/>
 </connectionStrings>

 

or if you have more connectionstring for more Dal Project a code similar to:

 

<connectionStrings>
   <add name="LunaTestVb.ConnectionString" connectionString="Data Source=localhost\sqlexpress;Initial Catalog=myDb;MultipleActiveResultSets=true;User Id=sa;Password=pwd;Encrypt=false;Packet Size=4096;Connection Timeout=10;"/>
 </connectionStrings>



NOTE
It's important, LunaEngine search ConnectionString FIRST with prefix DALPROJECTNAME (second example code), so you have different DalProject inside a solution with different ConnectionString. So rename in your connectionstring with appropriate Dal Project Name that you have created. In this example Project name is LunaTestVb. If LunaEngine don't find the specific connectionstring with project name prefix, find for generic "ConnectionString" (first example code)

Last edited Mar 12, 2014 at 12:29 PM by Lunadix, version 2