Skip to content

where条件动态拼接的问题。 #256

Closed
@mylovefly001

Description

@mylovefly001
Expression<Func<a, b, bool>> func1 = (a,b) => true;
            if (!string.IsNullOrWhiteSpace(name))
            {
                //?a.name=name
            }
            
            return await DbContext.Mysql.Select<a,b>()
                .LeftJoin((a,b)=>b.Id==a.id)
                .Where(func1)
                .Page(page, pageSize)
                .ToListAsync();

请教一下,如上面的func1怎么拼接。。。
toListAsync里如何同时返回a,b的字段。。。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions