@@ -139,14 +139,14 @@ internal static ModelDefinition GetModelDefinition(this Type modelType)
139
139
IsPrimaryKey = isPrimaryKey ,
140
140
AutoIncrement =
141
141
isPrimaryKey &&
142
- propertyInfo . HasAttributeNamed ( nameof ( AutoIncrementAttribute ) ) ,
142
+ propertyInfo . HasAttribute < AutoIncrementAttribute > ( ) ,
143
143
IsIndexed = ! isPrimaryKey && isIndex ,
144
144
IsUnique = isUnique ,
145
145
IsClustered = indexAttr != null && indexAttr . Clustered ,
146
146
IsNonClustered = indexAttr != null && indexAttr . NonClustered ,
147
147
IsRowVersion = isRowVersion ,
148
- IgnoreOnInsert = propertyInfo . HasAttributeNamed ( nameof ( IgnoreOnInsertAttribute ) ) ,
149
- IgnoreOnUpdate = propertyInfo . HasAttributeNamed ( nameof ( IgnoreOnUpdateAttribute ) ) ,
148
+ IgnoreOnInsert = propertyInfo . HasAttribute < IgnoreOnInsertAttribute > ( ) ,
149
+ IgnoreOnUpdate = propertyInfo . HasAttribute < IgnoreOnUpdateAttribute > ( ) ,
150
150
FieldLength = stringLengthAttr ? . MaximumLength ,
151
151
DefaultValue = defaultValueAttr ? . DefaultValue ,
152
152
CheckConstraint = chkConstraintAttr ? . Constraint ,
@@ -166,7 +166,7 @@ internal static ModelDefinition GetModelDefinition(this Type modelType)
166
166
IsRefType = propertyType . IsRefType ( ) ,
167
167
} ;
168
168
169
- var isIgnored = propertyInfo . HasAttributeNamed ( nameof ( IgnoreAttribute ) )
169
+ var isIgnored = propertyInfo . HasAttribute < IgnoreAttribute > ( )
170
170
|| fieldDefinition . IsReference ;
171
171
if ( isIgnored )
172
172
modelDef . IgnoredFieldDefinitions . Add ( fieldDefinition ) ;
0 commit comments