score:2

Accepted answer
public List<MyType> GetMyTypes(List<int> ids)
{
return (from myType in db.MyTypes
        where ids.Contains(myType.Id)
        select new MyType
        {
            MyValue = myType.MyValue
        }).ToList();
}

score:1

Untested

public List<MyType> GetMyTypes(List<int> myIds) {
  var x = from myType in db.MyTypes
          where myIds.contains(myType.Id)
          select new MyType {
            MyValue = mytype.Myvalue
          };
return x.ToList();
}

Related Articles