public MetaTableMetadata(MetaTable table) { Debug.Assert(table != null); Attributes = table.BuildAttributeCollection(); _readOnlyAttribute = Attributes.FirstOrDefault <ReadOnlyAttribute>(); _displayNameAttribute = Attributes.FirstOrDefault <DisplayNameAttribute>(); DisplayColumnAttribute = Attributes.FirstOrDefault <DisplayColumnAttribute>(); ScaffoldTable = Attributes.GetAttributePropertyValue <ScaffoldTableAttribute, bool?>(a => a.Scaffold, null); }
public MetaTableMetadata(MetaTable table) { Debug.Assert(table != null); Attributes = table.BuildAttributeCollection(); _readOnlyAttribute = Attributes.FirstOrDefault<ReadOnlyAttribute>(); _displayNameAttribute = Attributes.FirstOrDefault<DisplayNameAttribute>(); DisplayColumnAttribute = Attributes.FirstOrDefault<DisplayColumnAttribute>(); ScaffoldTable = Attributes.GetAttributePropertyValue<ScaffoldTableAttribute, bool?>(a => a.Scaffold, null); }