S
shapper
Hello,
I have two tables:
Polls > PollID, Question
Options > OptionID, Answer
Given a OptionID I want to get the poll to which the Option "Belongs":
Poll poll = database.Polls.Select(p => p.Options.Select(o =>
o.OptionID = id)).SingleOrDefault;
I am not sure if this is the right way but I am getting an error
anyway:
Cannot convert method group 'SingleOrDefault' to non-delegate type
'MyApp.Models.Poll'. Did you intend to invoke the method?
I have all relations between tables well defined and I used LinqToSQL
classes.
How should I do this?
Thanks,
Miguel
I have two tables:
Polls > PollID, Question
Options > OptionID, Answer
Given a OptionID I want to get the poll to which the Option "Belongs":
Poll poll = database.Polls.Select(p => p.Options.Select(o =>
o.OptionID = id)).SingleOrDefault;
I am not sure if this is the right way but I am getting an error
anyway:
Cannot convert method group 'SingleOrDefault' to non-delegate type
'MyApp.Models.Poll'. Did you intend to invoke the method?
I have all relations between tables well defined and I used LinqToSQL
classes.
How should I do this?
Thanks,
Miguel