In order to test a method that uses a stored procedure, a fake method has been created. This method is to return a list of ints.
Something like this ...
public virtual ObjectResult<Nullable<int>> available_IDs( ... )
{
List<int?> fakeAvailableIDList = new List<int?>();
fakeAvailableIDList.Add(1);
fakeAvailableIDList.Add(2);
fakeAvailableIDList.Add(3);
ObjectResult<Nullable<int>> result = fakeAvailableIDList.All(m => m > 0);
return result;
}
which fails with
Cannot implicitly convert type 'bool' to 'System.Data.Objects.ObjectResult<int?>'
tried (amoungst other things)
ObjectResult<Nullable<int>> result = fakeAvailableIDList.All(m => m > 0);
which gives
Cannot implicitly convert type 'System.Collections.Generic.List<int?>' to 'System.Data.Objects.ObjectResult<int?>'
how can I get a List<> into ObjectResult ?