where cluse using linq

Posted by Aparna Bhise under Regular Expressions on 5/2/2011 | Points: 10 | Views : 1078 | Status : [Member] | Replies : 1
I want to select only one column from table using where cluse using linq in asp.net
there i want to check id=ddlcombo1.selectedvalue

plz help me

i write this statment but it does not work

var cou = (from c in _db.country_m
where c.country_id == cu
select c.abbrivation);

Thanks and Regards,

Aparna Bhise



Responses

Posted by: T.saravanan on: 5/2/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi,
I think you miss a quotes in your code...
var cou = (from c in _db.country_m 

where c.country_id == "cu"
select c.abbrivation);


For your reference...http://msdn.microsoft.com/en-us/vcsharp/aa336760#WhereSimple1



Thanks,
T.Saravanan

Aparna Bhise, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response