I have a table with two foreign key fields point to colour table.
BookCover -> ForegroundColour and
BookCover -> BackgroundColour
When I do Reverse Engineer Code First, it generates Colour and Colour1 in the BookCover class.
public virtual Colour Colour { get; set; }
public virtual Colour Colour1 { get; set; }
I have set the foreign name to be ForegroundColour and BackgroundColour.
Is there a easy way let Entity frame work generate the ForegroundColour and BackgroundColour instead of Colour and Colour1?
You can change the association names in the EF model designer. Once they have been changed, the framework will remember the new names, even if you update the model at a later time.