Skip to content

子查询报错 是因为Type关键字吗? #1118

@zhangkeyuan

Description

@zhangkeyuan

image

使用.Where(o => o.ActivityType == ac.Type)报错
版本号:3.2.640

var activityPeopleCountList = _fsql.Select<SalesmanActivityConfig>() .Where(a => a.SalesmanId == req.SalesmanId) .ToList(a => new ActivityPeopleCountModel { Type = a.Type, Count = _fsql.Select<SalesmanActivityOrder>() .Where(o => o.SalesmanId == a.SalesmanId) .Where(o => a.Type == o.ActivityType)//报错ArgumentException: Requested value 'a.Type' was not found. //.Where("o.ActivityType = a.Type", null)//正常 .Where(o => o.PayStatus == SalesmanActivityOrderPayStatusEnum.YiWanCheng) .WhereIf(req.StartTime.HasValue, o => o.AddTime.Between(req.StartTime.Value, req.EndTime.Value)) .Count(), });

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