Setting up database

Once you have installed dotEntity to your project, before you can do anything else, you need to initialize the dotEntity connection.

This is done by calling the initialize method of DotEntityDb class. Note that you should do this during application startup.


DotEntityDb.Initialize("<your connection string>", <your database provider>);


The following example shows the initalization of dotEntity with SqlServerProvider

                @"Data Source=.\sqlexpress;Initial Catalog=dotdb;Integrated Security=False;Persist Security Info=False;User ID=sqlusername;Password=pwd#123",
                new SqlServerDatabaseProvider());