I have a Linq query that I want to call from multiple places:
var myData = from a in db.MyTable
where a.MyValue == "A"
select new
{
a.Key,
a.MyValue
};
How can I create a method, put this code in it, and then call it?
public ??? GetSomeData()
{
// my Linq query
}