Click here to Skip to main content
15,899,020 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi I need to write following method, thanks for you help




C#
private IEnumerable SelectRows(string p)
{
   throw new NotImplementedException();
}
Posted
Updated 4-Nov-11 4:14am
v2
Comments
Mehdi Gholam 4-Nov-11 2:38am    
What is "p"?
Richard MacCutchan 4-Nov-11 10:27am    
16th letter of the alphabet.
Mehdi Gholam 4-Nov-11 10:33am    
:)
Richard MacCutchan 4-Nov-11 10:27am    
OK, go ahead, nobody here is stopping you!
Bala Selvanayagam 4-Nov-11 19:27pm    
You needs to give us more details, Its not possible to help you with the limited information you have given.

You needs to go into detail and say what you are trying to achieve and what you have done so far and what is the exact problem.

Without these, its not practical to help you

1 solution

C#
private IEnumerable SelectRows(string p)
{
    var rows = from row in db.Row
                  where row.field1 = p
                  select row;

// then you either use
    foreach (Row row in rows)
    {
         yield return row;
    }
}

Or simply
C#
   return rows.ToList();
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900