HORK Sample: HORK database properties
Now that you have had to HORK up your data model and entity classes, you are ready to use the code in your application.
Before you can use HORK, you need to initialize the connection to the database at application startup:
ConnectionProperties cnnProperties = new ConnectionProperties(); cnnProperties.Server = "MYDBSERVER"; cnnProperties.Database = "Downwind"; cnnProperties.User = "sa"; cnnProperties.Password = "foogoo"; DBContext.InitializeProperties(cnnProperties);
The ConnectionProperties class has a few other properties for the database such as the port number to use and if Windows Authentication is needed.