c# - hook in the entity framework generated proxy -


currently i'm building application supports localization of database content. entities have 2 entities.

- entity - entitytranslation 

the entity has same fields, values default language. translation table supports other languages. whenever want retrieve translated result have query on translation entity. makes code less readable desired.

at first thinking hook in repo's. so, when entity derived localizedentity check users language , if not default fetch translation entity table , copy them on entity. (simple explenation, in practice lot more work.)

though, when entity accessed via navigation property not work. handled entity framework via generated proxy. question is, can somehow hook generated proxy , add custom logic it? tried find documentation indicate starting point hook in process, thusfar not succesful. hoping did this.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -