-
Notifications
You must be signed in to change notification settings - Fork 860
Import Entity Configuration from Database
2881099 edited this page Nov 22, 2023
·
7 revisions
中文 | English
This situation can be solved: the database is "with primary key + self-increment", but the entity is not configured with the corresponding attributes.
Import primary key and self-increment information from the database, apply DbFirst mode, no need to set [Column(IsPrimary)]
or ConfigEntity on the entity type:
fsql.CodeFirst.IsConfigEntityFromDbFirst = true;
This function is currently available for mysql/sqlserver/postgresql/oracle.
Enabling this function will increase the first execution time (the time consumption is related to the number of tables)
Database configuration> Entity Attribute> FluentApi> Aop (custom entity attribute)