Determine DB properties
When you use HORK to generate entities for your SQLServer database, there are a number of properties required which provide access to the database and its tables.
It is best if you gather these properties before you use HORK as they are required to execute the code generation process. The required database properties for HORK are as follows:
- Server name or I.P address: The address of the database server. If the database is part of an instance (SQLServer Express), then the instance name should be included.
- Port number: The port number SQLServer uses for client requests. If SQLServer is using the default port 1433, then no port number is needed.
- Database name: The name of the database you want to use with HORK. HORK will work with one database at this time.
- Table name(s): HORK can support all the tables in a database, but you may not want all tables in your model. Its recommended to only add tables to your model that are needed by the application.
When you run the HORKTemplateGenerator you have to supply the table information as a list of tables to include, or a list of tables to exclude, or indicate all tables in the database.
- Database login credentials: SQLServer supports SQL Authentication with a login and password value, as well as Windows Authentication with no credentials.
Based on the database and tables that you want to add to your HORK model, you need to be sure that you have the appropriate login credentials.
When the HORKTemplateGenerator queries the database, it will require SELECT permissions on all user tables and sys tables.