Background:
From a Java project to a. NET core project, convert Java entities to. NET entities, and then update directly to the database using the EF tool
The command is as follows:
Enable-migrations-enableautomaticmigrationsadd-migration Initialcreateupdate-database-verbose Update will encounter a few issues 1. Foreign key relationship: Because my project uses GUIDs to do associations, all do not use foreign keys, if you want to do foreign key Association can refer to this article https://www.cnblogs.com/xishuai/p/ Ef-dbcontext-savechanges-foreignkey-value.html 2. Comments cannot be updated to the database if a comment is manually added to the database, dozens of tables, will be very painful: and then look at the online ideas, based on the generated XML to get comments , update to the database if you have any tools, I hope you share the next-,-, the following simple introduction:
Code fisrt update comments to MySQL database