Skip to content

Commit 5168ec5

Browse files
committed
Minor improvement of code style (skip property)
1 parent fa2a51d commit 5168ec5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/SpatialFocus.EntityFrameworkCore.Extensions/EnumLookupExtension.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private static void ConfigureEnumLookupForProperty(ModelBuilder modelBuilder, En
7676
{
7777
Type propertyType = property.ClrType;
7878

79-
if (!IsValid(propertyType, enumOptions))
79+
if (ShouldSkip(propertyType, enumOptions))
8080
{
8181
return;
8282
}
@@ -232,19 +232,19 @@ private static bool IsEnumOrNullableEnumType(this Type propertyType)
232232
return false;
233233
}
234234

235-
private static bool IsValid(Type propertyType, EnumLookupOptions enumOptions)
235+
private static bool ShouldSkip(Type propertyType, EnumLookupOptions enumOptions)
236236
{
237237
if (!propertyType.IsEnumOrNullableEnumType())
238238
{
239-
return false;
239+
return true;
240240
}
241241

242242
if (enumOptions.UseEnumsWithAttributesOnly && !propertyType.HasEnumLookupAttribute())
243243
{
244-
return false;
244+
return true;
245245
}
246246

247-
return true;
247+
return false;
248248
}
249249
}
250250
}

0 commit comments

Comments
 (0)