i want to pass parameter to linq query...
public IEnumerable GetPhotos()
{
PhotoDBDataContext db = new PhotoDBDataContext();
var tProduct = db.Photos;
var query = from p in db.Photos
orderby p.PhotoId descending
select new { p.Album, p.AlbumId, p.Description, p.Photographer,
p.PhotographerId, p.PhotoId, p.Tags, p.Thumbnail,
p.Url };
return query;
}
in above example "orderby p.PhotoId descending" is used, i want to use parameter in place of p.PhotoId
is it possible...