Hi, I have created a function that retrieves values based on datepart of a datefield from a stored procedure:
public List<spDB1GetIDsByTimeResult> GetIDsByTime(int timePart)
{
using (DB1DataContext db1= new DB1DataContext ())
{
List<spDB1GetIDsByTimeResult> query = db1.spDBGetIDsByTime(timePart).ToList();
return query;
}
}
Now I want to use those results, which only has 1 field called ID to be used in a Contains query from here:
var query = from e in db2.Table1
join f in db2.Table2 on e.ID equals f.ID where GetIDsByTime(variable).Contains(ID Parameter here)
Now I couldn't get it. Anybody here got my question and has an answer? ^_^ Thanks
other info: I am using 2 dbml files, the IDs from spDB1GetIDsByTimeResult is from another dbml file and the var query part queries another dbml file.