Jointure in linq with a regular expression
Posted
by Graveen
on Stack Overflow
See other posts from Stack Overflow
or by Graveen
Published on 2010-05-29T10:36:17Z
Indexed on
2010/05/29
10:42 UTC
Read the original article
Hit count: 230
I'm actually using a join in linqtosql (via dblinq).
I'm trying to include a regular expression in the join part of the linq query.
from i in collectiona
join j in collectionb on Regex.IsMatch(i.name, j.jokered_name) equals true
(...)
I agree i can push the RegExp check in the where part of the linq query, but i was wondering if it is possible in the join part ? The above code wants an "i equals j" code structure.
One thing i think to perform is overriding Equals() which 'll contains the RegEx.IsMatch() stuff and put a simple i equals j in the join part.
Any suggestions about my problem ?
© Stack Overflow or respective owner