@model GenDbTableDto @{ var className = Model.EntityName; var tableName = Model.TableName; var ignores = new string[] { "Id", "CreationTime", "CreatorUserId", "LastModificationTime", "LastModifierUserId" , "DeletionTime", "DeleterUserId", "IsDeleted" }; var tableInfos = Model.TableInfos .Where(w => !ignores.Contains(w.ColumnName)) .OrderBy(w => w.Position) .ToList() ; var searchKeyWords = new[] { "Title", "Name", "Phone", "Address", "Email" }; var searchKeyWord = string.Empty; foreach (var item in searchKeyWords) { if (tableInfos.Any(w => w.ColumnName == item)) { searchKeyWord = item; break; } } if (string.IsNullOrWhiteSpace(searchKeyWord)) { searchKeyWord = "请设置检索框"; } }