where clause on object C# silverlight

13 Mar

LINQ where clause with lambda expression  With Specific Keyword Show the Data in Silverlight or in WebService

if your create a class object an after filled then your want to load all data from db and restrict on specific keyword data not show ,so you need to apply this method.

Where(x => x.Status != “Complete”).ToList();

if you not use toList() then give you Casting Error so, must use this

This is WebServices Method in silverlight

public List<tblTest> GetCampaignByCompanyId(int companyid)
List<tblcampaign> lst = new List<tblcampaign>();

tblcampaign c = new tblcampaign();
if (c.RowCount > 0)
lst = tblcampaign.PopulateCampaign(c).Where(x => x.Status != “Complete”).ToList();

return lst;




// u.DataTable.Select(“RoleID in (3,4) and isdeleted=0”)

Leave a comment

Posted by on March 13, 2012 in Silverlight


Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: