How to configure navigation property naming format?
How to configure navigation property naming format?
How to configure nagivation naming format?
Example
Account_CountryId
Navigation properties like this
Object_ColumnName
Objects_ColumnName
instead
Object <-- singular
Objects <-- plural
Example
Account_CountryId
Navigation properties like this
Object_ColumnName
Objects_ColumnName
instead
Object <-- singular
Objects <-- plural
Re: How to configure navigation property naming format?
Is it also possible to refresh and rename all navigation properties in this format?
Re: How to configure navigation property naming format?
Open Model Settings, navigate to Synchronization > Model Naming > the Class Properties' Names section, and check available options, for example:RobertK wrote: How to configure nagivation naming format?
* Pluralize collection navigation properties
* Add constraint details to navigation properties
The new settings will be applied to newly added entities only. You can recreate the model.RobertK wrote: Is it also possible to refresh and rename all navigation properties in this format?
Re: How to configure navigation property naming format?
recreate models destroys my diagram layout, I would prefer if I could click on a button and it would tell me which model/property does not meet standard format.
Re: How to configure navigation property naming format?
There is no such option currently. We will investigate the question.
Re: How to configure navigation property naming format?
I'm still unable to correctly configure the navigation properties.
Example
You have two class models CreditCard and Address
CreditCard has a foreignkey called "BillingAddress"
>CreditCard
Id
Name
Number
...
BillingAddressId <-- foreign key to "Address"
--
>Navigation Properties
BillingAddress <-- (this is the correct name, it is the name of the column without "ID", by default this nagivation property is set to "Address")
>Address
Id
Name
...
>Navigation Properties
CreditCards_BillingAddress <-- (this is the correct name, it is the name of the foreignkey class model underscore column name without ID, by default this nagivation property is set to "CreditCards")
Example
You have two class models CreditCard and Address
CreditCard has a foreignkey called "BillingAddress"
>CreditCard
Id
Name
Number
...
BillingAddressId <-- foreign key to "Address"
--
>Navigation Properties
BillingAddress <-- (this is the correct name, it is the name of the column without "ID", by default this nagivation property is set to "Address")
>Address
Id
Name
...
>Navigation Properties
CreditCards_BillingAddress <-- (this is the correct name, it is the name of the foreignkey class model underscore column name without ID, by default this nagivation property is set to "CreditCards")
Re: How to configure navigation property naming format?
Ideally would want this navigation properties naming pattern
(example only, does not represent a realworld database design)
(example only, does not represent a realworld database design)
Re: How to configure navigation property naming format?
The "Add constraint details to navigation properties" option from Model Settings produces the naming pattern 2 b) from your screenshot. It works for Database-First only at the moment. We will investigate the possibility to apply this option for Model-First as well and notify you about the result.