public List GetpathsById(List id)
{
long[] aa = id.ToArray();
long x;
List paths = new List();
public List GetpathsById(List id)
{
long x;
List paths = new List();
foreach(long aa in id)
{
Presentation press = context.Presentations.Where(m => m.PresId == aa).FirstOrDefault();
paths.Add(press.FilePath);
}
return paths;
}
to
public IEnumerable GetpathsById(List id)
{
foreach(long item in id)
yield return = (context.Presentations.Where(m => m.PresId == item).FirstOrDefault()).FilePath
}
"Short style", but not recomended if you write a lot of other function.