Cannot implicitly convert type 'System.Linq.IQueryable' to 'System.Collections.Generic.IList'
To convert IQuerable
or IEnumerable
to a list, you can do one of the following:
IQueryable<object> q = ...;
List<object> l = q.ToList();
or:
IQueryable<object> q = ...;
List<object> l = new List<object>(q);
You can replace IList<DzieckoAndOpiekun> resultV
with var resultV
.
If using a where clause be sure to include .First()
if you do not want a IQueryable object.