@@ -139,14 +139,14 @@ internal static ModelDefinition GetModelDefinition(this Type modelType)
139139 IsPrimaryKey = isPrimaryKey ,
140140 AutoIncrement =
141141 isPrimaryKey &&
142- propertyInfo . HasAttributeNamed ( nameof ( AutoIncrementAttribute ) ) ,
142+ propertyInfo . HasAttribute < AutoIncrementAttribute > ( ) ,
143143 IsIndexed = ! isPrimaryKey && isIndex ,
144144 IsUnique = isUnique ,
145145 IsClustered = indexAttr != null && indexAttr . Clustered ,
146146 IsNonClustered = indexAttr != null && indexAttr . NonClustered ,
147147 IsRowVersion = isRowVersion ,
148- IgnoreOnInsert = propertyInfo . HasAttributeNamed ( nameof ( IgnoreOnInsertAttribute ) ) ,
149- IgnoreOnUpdate = propertyInfo . HasAttributeNamed ( nameof ( IgnoreOnUpdateAttribute ) ) ,
148+ IgnoreOnInsert = propertyInfo . HasAttribute < IgnoreOnInsertAttribute > ( ) ,
149+ IgnoreOnUpdate = propertyInfo . HasAttribute < IgnoreOnUpdateAttribute > ( ) ,
150150 FieldLength = stringLengthAttr ? . MaximumLength ,
151151 DefaultValue = defaultValueAttr ? . DefaultValue ,
152152 CheckConstraint = chkConstraintAttr ? . Constraint ,
@@ -166,7 +166,7 @@ internal static ModelDefinition GetModelDefinition(this Type modelType)
166166 IsRefType = propertyType . IsRefType ( ) ,
167167 } ;
168168
169- var isIgnored = propertyInfo . HasAttributeNamed ( nameof ( IgnoreAttribute ) )
169+ var isIgnored = propertyInfo . HasAttribute < IgnoreAttribute > ( )
170170 || fieldDefinition . IsReference ;
171171 if ( isIgnored )
172172 modelDef . IgnoredFieldDefinitions . Add ( fieldDefinition ) ;
0 commit comments