/// <summary> /// 获取列 /// </summary> private SqlItem GetColumn(Expression expression, bool right) { var type = _resolver.GetType(expression, right); var column = _resolver.GetColumn(expression, type, right); if (string.IsNullOrWhiteSpace(column)) { return(new SqlItem(Lambda.GetValue(expression).SafeString(), raw: true)); } return(new SqlItem(GetColumn(type, column))); }
/// <summary> /// 获取列 /// </summary> private SqlItem GetColumn(Expression expression, bool right) { var type = _resolver.GetType(expression, right); var column = _resolver.GetColumn(expression, type, right); if (string.IsNullOrWhiteSpace(column)) { var name = _parameterManager.GenerateName(); _parameterManager.Add(name, Lambda.GetValue(expression)); return(new SqlItem(name, raw: true)); } return(new SqlItem(GetColumn(type, column))); }