-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigation Propery Name #69
Comments
If you refactor and rename the property, the changes should be kept upon re-generation. Is that not the case? |
Navigation properties (generated relationships) are not being preserved upon re-generation even after renaming them through the IDE. The renamed properties revert back to the default auto generated names. For example: public partial class Person { public partial class User { How can I rename the generated relationship property to the desired name and preserve said change so a re-generation won't revert it back? |
@pwelter34 Currently renaming of 'generated relationships' are reverted upon regeneration.
fyi I would like the rename functionality for generated relationships for the following example (hierarchical table): class Project
{
Guid Id { get; set; }
Guid? ParentProjectId { get; set; }
//Generated relationships
virtual Project ParentProject { get; set; }
virtual ICollection<Project> ParentProjects { get; set; } //=> I want this to be named 'ChildProjects'
} |
Dear all
I like this tool as it generates entities for database views and can customize the output. the tiny issue I got when using Scaffold-DbContext for reverse engineering:
public Patent()
{
public virtual ICollection Inventors { get; set; }
}
but when generate with the generator tool, I got this:
public Patent()
{
public virtual ICollection PatentInventors { get; set; }
}
as you see the class name Patent has been concatenated to the property name, so can we have any custom way to keep only the navigation property name?
The text was updated successfully, but these errors were encountered: