Home > Net >  IQueryable query type error
IQueryable query type error

Time:12-23


I use the method of paging

Public static async Task CreateAsync (IQueryable The source, int pageIndex, int pageSize)
{
Var count=await source. CountAsync ();
Var items=await source. Skip ((pageIndex - 1) * pageSize.) Take (pageSize). ToListAsync ();
Return new PaginatedList (the items, the count, pageIndex pageSize);
}

Internal static Task CreateAsync (IQueryable Queryables, int v, int pageSize)
{
Throw new NotImplementedException ();
}

I need to do now
1. More than one table associated query, directly in an error,

Var purchase_order=the from s in _context. Purchase_order
The join w in _context. User on s.c reate_id equals w.i d
Select new
{
S.i d,
Spyware doctor ept,
S.a pplicant,
W.n ame
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

CodePudding user response:

Var purchase_order=the from s in _context. Purchase_order
The join w in _context. User on s.c reate_id equals w.i d
Select new
{
S.i d,
Spyware doctor ept,
S.a pplicant,
W.n ame
}
Is there any final. ToPaginatedList () method

CodePudding user response:



Without this

CodePudding user response:

Where did you use the paging method?
I didn't see ah, from the inside of the code,

CodePudding user response:

Var list=the from u in _TypeRepository. Table
The join m in _GroupRepository Table
On the u.c. ouponGroup equals m.C ouponGroup_
Select new
{
U.T ype_,
M. alue,
M.C ost,
M. iscount,
M.G ift
};
List. ToList ();

Inheritance IRepository can use the


CodePudding user response:

CodePudding user response:

reference 4 floor Snack_CDL response:
var list=the from u in _TypeRepository. Table
The join m in _GroupRepository Table
On the u.c. ouponGroup equals m.C ouponGroup_
Select new
{
U.T ype_,
M. alue,
M.C ost,
M. iscount,
M.G ift
};
List. ToList ();

Inheritance IRepository can use this


What is this IRepository interface?
  • Related