This question is locked. New answers and comments are not allowed.
I am using a repository pattern in a database-first environment in my data layer, and want to route all queries through that. Therefore I'd like to disable navigation properties from being generated on my model classes. Currently I'm just editing the association through the designer and unchecking the box for the navigation property, but I'm looking for a more automated way of doing this when the classes are generated (so when a new table is added this step doesn't have to be done).
I figure I can customize the T4 templates, but what would I check to determine if the property being rendered is a navigation property or not?
Thanks.
I figure I can customize the T4 templates, but what would I check to determine if the property being rendered is a navigation property or not?
Thanks.