我正在尝试将以下查询重写为单独的语句:
var sql = Repository.Products.AsQueryable();
sql = sql.Where(x => x.Name == "aaaaa" || x.Name == "bbbbb");
如果我这样做:
sql = sql.Where(x => x.Name == "aaaaa");
sql = sql.Where(x => x.Name == "bbbbb");
那么结果查询等于:
sql = sql.Where(x => x.Name == "aaaaa" && x.Name == "bbbbb");
有什么想法如何以正确的方式做到这一点?