专业名称搜索
parent
fd5db888c5
commit
18612c18a7
|
|
@ -20,13 +20,14 @@ namespace New_College.Repository
|
||||||
|
|
||||||
public async Task<List<SeachMajorDtoResponse>> SeachMajor(SeachMajorDtoRequest request)
|
public async Task<List<SeachMajorDtoResponse>> SeachMajor(SeachMajorDtoRequest request)
|
||||||
{
|
{
|
||||||
var query = await this.Db.Queryable<D_MajorCategory, D_MajorClass, D_Major>((a, b, c) => new object[] { JoinType.Left, a.Id == b.TradeId, JoinType.Left, b.Id == c.CategoryClass_Id })
|
|
||||||
.Where((a, b, c) => SqlFunc.Contains(request.Name, c.MajorName))
|
var query = await this.Db.Queryable<D_Major,D_MajorClass, D_MajorCategory>((c,b,a) => new object[] { JoinType.Left, b.Id == c.CategoryClass_Id,JoinType.Left, a.Id == b.TradeId })
|
||||||
.Select((a, b, c) => new SeachMajorDtoResponse
|
.Where((c, b, a) => c.MajorName.Contains(request.Name))
|
||||||
|
.Select((c, b, a) => new SeachMajorDtoResponse
|
||||||
{
|
{
|
||||||
Code = c.MajorCode,
|
Code = c.MajorCode,
|
||||||
Id = c.Id,
|
Id = c.Id,
|
||||||
Name = a.Name,
|
Name = c.Name,
|
||||||
Type = a.Type,
|
Type = a.Type,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue