Hi Absaar,
The LINQ provider was probably downloading all your contacts and then filtering client side. You should also consider using LINQ projection to only select the attribute you want - this will increase performance even more:
var query = (from c in xrm.ContactSet
where c.Telephone1 == Name
select new Contact{
FirstName = c.FirstName,
LastName = c.LastName
});
This code will only return the first name and last name attributes (and the ID that is automatically included)
hth,
Scott
Scott Durow
Blog www.develop1.net
Follow Me
Rockstar365
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"