public virtual string GetSelectValueByString() { string result; if (this.SelectValue.IsNullOrEmpty()) { string pre = null; if (this.JoinQueryInfos.HasValue() && this.JoinQueryInfos.Any(it => TableShortName.HasValue())) { pre = Builder.GetTranslationColumnName(TableShortName) + "."; } var columns = this.Context.EntityMaintenance.GetEntityInfo(this.EntityType).Columns.Where(it => !it.IsIgnore); if (this.IgnoreColumns.HasValue()) { columns = columns.Where(c => !this.IgnoreColumns.Any(i => c.PropertyName.Equals(i, StringComparison.CurrentCultureIgnoreCase) || c.DbColumnName.Equals(i, StringComparison.CurrentCultureIgnoreCase))).ToList(); } result = string.Join(",", columns.Select(it => pre + Builder.GetTranslationColumnName(it.EntityName, it.PropertyName))); } else { result = this.SelectValue.ObjToString(); this.SelectCacheKey = result; } if (result.IsNullOrEmpty()) { result = "*"; } return(result); }
public virtual string GetSelectValueByString() { string result; if (this.SelectValue.IsNullOrEmpty()) { string pre = null; if (this.JoinQueryInfos.HasValue() && this.JoinQueryInfos.Any(it => TableShortName.HasValue())) { pre = Builder.GetTranslationColumnName(TableShortName) + "."; } result = string.Join(",", this.Context.EntityMaintenance.GetEntityInfo(this.EntityType).Columns.Where(it => !it.IsIgnore).Select(it => pre + Builder.GetTranslationColumnName(it.EntityName, it.PropertyName))); } else { result = this.SelectValue.ObjToString(); this.SelectCacheKey = result; } if (result.IsNullOrEmpty()) { result = "*"; } return(result); }