I have two tables with below structure :
*Table User*
id int identity
username varchar
role varchar
*Table Ticket*
id int identity
admin_id int
user_id int
admin_id
and user_id
are the foreign keys from User
table.
I set a relation name for the relations in Mssql diagram, but when i create my model from this database, the relations are : User
and User1
.
When I'm changing them manually, it is going Ok, but after refreshing the model or re-create the Ticket
table, User
and User1
are back.
How can i set the final name for my relations in EF model?even i refresh or delete the entire model, i want to the EF Model relation name are being same as the diagram relation name.