The demo of this article needs to complete the demo in the previous article: the RAFY Domain Entity Framework Example (1)-transforms the traditional three-tier application. After completing the transformation of the traditional three-tier system, this article will explain some of the common features that come with using the Rafy Entity Framework.
Automatic database generation
After the conversion of the program is complete. Because the connection string of the database has already been configured, the whole program is run directly, Rafy will generate the corresponding database, table, field, and the corresponding foreign key relationship.
The library meets the requirements of the third normal form of the database. At the same time, the newly added attributes in the development process are automatically synchronized to the database each time.
The following is a clothing management system generated database structure diagram:
Monitoring execution of SQL statements
The framework can record all SQL statements and related logs executed during the run. This provides a better help for developers to do system debugging and performance optimization.
This feature needs to be opened manually. Add the following configuration to the configuration file:
<configuration>
<appSettings>
<!--If you are listening to all of the SQL statements for your application, open the following configuration-->
<add key= "Sql_ Trace_file "value=" D:\SQLTraceLog.txt "/>
</appSettings>
</configuration>