Lambda expressions from sql
i am trying to do this in lambda :
Select Hint from [tablename] where Answer = 'answer';
this is what i have tried so far :
public ModelSQL.puzzlecontent GetAcrossClue(string answer)
{
return context.puzzlecontents.Where(c =>
c.Answer.Equals(answer)).Select( g => new {g.Hint});
}
Error says :
Cannot implicitly convert type 'System.Linq.IQueryable' to
'iStellar.ModelSQL.puzzlecontent'. An explicit conversion exists (are you
missing a cast?)
No comments:
Post a Comment