My "socialsecuritynumber" contains a "-" character, fx. 123456-8888, that I want to remove before searching for a match.
However, I seem to be doing something wrong. In the “Foreach” it is no problem, but I want to place it in my Select statement.
Hope you can help :-)
var contactquery = (
from c in xrm.ContactSet
join bu in xrm.BusinessUnitSet on c.OwningBusinessUnit.Id equals bu.BusinessUnitId
where bu.Name == businessunit
//where c.socialsecuritynumber.Contains(input) [WORKS]
//where Char.IsDigit(c.socialsecuritynumber).Contains(input) [DOES NOT WORK]
select new { c.ContactId, c.socialsecuritynumber, c.FullName }
)
.Distinct()
.ToList();