public IncludeProperty(string propertyName, IEnumerable <string> fields, MyJoinType joinType = MyJoinType.LeftJoin) { PropertyName = propertyName; FieldList = fields?.ToList() ?? new List <string>(); JoinType = joinType; }
public string GetJoinString(MyJoinType joinType) { switch (joinType) { case MyJoinType.LeftJoin: return("LEFT JOIN"); case MyJoinType.InnerJoin: return("INNER JOIN"); default: throw new ArgumentException("无效的表连接类型", nameof(joinType)); } }