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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -