You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Is it possible to use translations for navigation properties?
I'm using foreign keys in dbcontext, and have succesfully overriden the FK value via an expression. But I cannot think of a way of overriding the actual navigation?
-thanks
Alex.
The text was updated successfully, but these errors were encountered:
Good question damieng! It is a pretty odd request :-)
We've found Linq.Translations to be a nice retro-fit for customising the properties of an entity in a multi-tenant system.
The possible purpose of customising a navigation property is to allow the tenant to change a relationship.
For example a tenant is allowed to customise the title of a "course", but they also need to be able to customise "approval type" relationship (e.g. approved by a line manager, approved by the head of the business etc)
Unfortunately changing the foreign key wasn't enough to trick EF into switching it.
The linq expression does a join to a customisations table (based upon the logged in user), if a customisation is found it switches the original values for the customised values. It's working pretty well and we've got a workaround for the navigation properties, but I wondered if there was a way to get the navigation properties to work to.
Hi,
Is it possible to use translations for navigation properties?
I'm using foreign keys in dbcontext, and have succesfully overriden the FK value via an expression. But I cannot think of a way of overriding the actual navigation?
-thanks
Alex.
The text was updated successfully, but these errors were encountered: