entity framework: join on the rule "A = substring(B)"? -


could ask show me way how declare association between 2 entities 'record' , 'dictionaryitem' if corresponded tables on db level joined such interesting rule:

 records r left outer join dictionaryitems d    on substring(r.compositekey,3,8) = d.dictionaryitemid 

p.s. i'm working poco entities.

linq-to-entities doesn't support substring. must either execute sql directly calling context.database.sqlquery<> or must use entity sql - require converting dbcontext objectcontext via iobjectcontextadapter, creating objectset , running esql query.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -