IQueryable<T> IS3Repository.FindAllBuckets<T>()
{
IQueryable<object> list = _repository.GetAllBuckets().Cast<object>().AsQueryable();
return list == null ? default(T) : (T)list;
}
This is the error: Error 3 Cannot implicitly convert type 'T' to 'System.Linq.IQueryable'. An explicit conversion exists (are you missing a cast?)
I am implementing this interface:
IQueryable<T> FindAllBuckets<T>();
What is the problem?
This is what I have tried:
IQueryable<T> IS3Repository.FindAllBuckets<T>() { IQueryable<object> list = _repository .GetAllBuckets() .Cast<object>().AsQueryable();
return list == null ? list.DefaultIfEmpty().AsQueryable() : list; }