iDevLite Inc. You deserve free and comfortable developing trip.
  home  Home  >>  Daolite  >>  Getting Started with Daolite

Getting Started with Daolite


First of all:Download Daolite form HERE

Windows Application

Website Project

Windows Application

Step 1: Create Business object classes and corresponding mapping file – It's recommended that you use DaoliteMappingTool to create all of your Business object classes and corresponding mapping files. It's easy and fast. The following is step-by-step guide on how to create Business object classes and corresponding mapping files using DaoliteMappingTool.

mapping tool screen shot
a.Use Daolitemappingtool to connect to your database

mapping tool screen shot
Set primary key and database relation, select saving path, and then click on "Run" button to create Business object classes and mapping files.

mapping tool
These are Business object classes and mapping files created by Daolitemappingtool.

Step 2: Add the Business object classes and mapping files created in Step 1 to your project.

daolite

Step 3:Add the mapping files(in a mappings folder) created by Daolitemappingtool as resources to your project.

add resources

Step 5: Add Daolite.dll as Reference to your project.

daolite

Step 5: Set datasoure value to Configer of Business layer in the main Function of Program.cs, and load mapping files to the project.

For instance:
static void Main()
{
    //Datasource value
    NorthwindConfiger.DataSource = "192.168.1.2";
    NorthwindConfiger.Database = "Northwind";
    NorthwindConfiger.UserId = "sa";
    NorthwindConfiger.Password = "******";
    //loading mapping files
    NorthwindConfiger.GetConfiger().AddResourseMappings("Northwind");

    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new Form1());
}

Done. Now you can experience the superiority of Daolite during programming.

Website Project

Step 1:Follow the operations in Windows Application Step 1.

Step 2:Create a new ClassLibrary project for your solution, and then add the business object classes (excluding mapping files) to the project.

daolite

Step 3: Add mapping files(in a mappings folder) created by Daolitemappingtool to the App_data folder of your website project.

daolite

Step 4: Add Daolite.dll as Reference to both your website project and the ClassLibrary project you newly created.

Step 5: Add your newly created ClassLibrary project as reference to your website Bin folder.

daolite

Step 6: Set datasoure value to Configer of business objects in the Application_Start Function of Global.asax within your website project, and load mapping files to the project.

For instance:
void Application_Start(object sender, EventArgs e)
{
    // Code that runs on application startup
    Northwind.NorthwindConfiger.DataSource = "192.168.1.2";
    Northwind.NorthwindConfiger.Database = "Northwind";
    Northwind.NorthwindConfiger.UserId = "sa";
    Northwind.NorthwindConfiger.Password = "******";
    Northwind.NorthwindConfiger.GetConfiger()
        .AddMappings("Northwind", Server.MapPath("~/app_data/Northwind_mappings/"));
}

Done.Now you can experience the superiority of Daolite in the course of building your website.



To learn more about Daolite, please write to us at:support@idevlite.com
Download Daolite buy DaoliteMappingTool for .net now,only $99.95 USD
Awards
5-star-awards