internal static Task<object> CreateAsync(object p, int v, int pageSize)
Is being called instead of
public static async Task<PaginatedList<T>> CreateAsync(IQueryable<T> source, int pageIndex, int pageSize)
because every parameter matches "object p" including parameters of type IQueryable
You have to make parameter p more specific or actually implement that method.
More Detail:
Here's what's causing your problem:
throw new NotImplementedException();
If you implement (write the actual functional code) your error will go away.
But why is it getting top that point in the code (Line 47)
The reason is that List listOfStudents is also an object type because everything in C# extends object.
So that means that
CreateAsync(listOfStudents, pageNumber ?? 1, pageSize)
matches the signature of
internal static Task<object> CreateAsync(object p, int v, int pageSize)
{
throw new NotImplementedException();
}
and it gets called and throws the NotImplementedException.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…