diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index c8627d37c3..0574f8829c 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
- "version": "2025.3.0.4",
+ "version": "2025.3.1",
"commands": [
"jb"
],
diff --git a/JsonApiDotNetCore.sln.DotSettings b/JsonApiDotNetCore.sln.DotSettings
index 6b882a9c9f..ffa3a1b4a0 100644
--- a/JsonApiDotNetCore.sln.DotSettings
+++ b/JsonApiDotNetCore.sln.DotSettings
@@ -97,7 +97,7 @@
True
SUGGESTION
False
- <?xml version="1.0" encoding="utf-16"?><Profile name="JADNC Full Cleanup"><XMLReformatCode>True</XMLReformatCode><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="True" ArrangeVarStyle="True" ArrangeTrailingCommas="True" ArrangeObjectCreation="True" ArrangeDefaultValue="True" ArrangeNamespaces="True" ArrangeNullCheckingPattern="True" /><CssAlphabetizeProperties>True</CssAlphabetizeProperties><JsInsertSemicolon>True</JsInsertSemicolon><FormatAttributeQuoteDescriptor>True</FormatAttributeQuoteDescriptor><CorrectVariableKindsDescriptor>True</CorrectVariableKindsDescriptor><VariablesToInnerScopesDescriptor>True</VariablesToInnerScopesDescriptor><StringToTemplatesDescriptor>True</StringToTemplatesDescriptor><JsReformatCode>True</JsReformatCode><JsFormatDocComments>True</JsFormatDocComments><RemoveRedundantQualifiersTs>True</RemoveRedundantQualifiersTs><OptimizeImportsTs>True</OptimizeImportsTs><OptimizeReferenceCommentsTs>True</OptimizeReferenceCommentsTs><PublicModifierStyleTs>True</PublicModifierStyleTs><ExplicitAnyTs>True</ExplicitAnyTs><TypeAnnotationStyleTs>True</TypeAnnotationStyleTs><RelativePathStyleTs>True</RelativePathStyleTs><AsInsteadOfCastTs>True</AsInsteadOfCastTs><HtmlReformatCode>True</HtmlReformatCode><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSMakeAutoPropertyGetOnly>True</CSMakeAutoPropertyGetOnly><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CssReformatCode>True</CssReformatCode><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments><CSReorderTypeMembers>True</CSReorderTypeMembers><XAMLCollapseEmptyTags>False</XAMLCollapseEmptyTags><CSReformatInactiveBranches>True</CSReformatInactiveBranches></Profile>
+ <?xml version="1.0" encoding="utf-16"?><Profile name="JADNC Full Cleanup"><XMLReformatCode>True</XMLReformatCode><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="True" ArrangeVarStyle="True" ArrangeTrailingCommas="True" ArrangeObjectCreation="True" ArrangeDefaultValue="True" ArrangeNamespaces="True" ArrangeNullCheckingPattern="True" /><CssAlphabetizeProperties>True</CssAlphabetizeProperties><JsInsertSemicolon>True</JsInsertSemicolon><FormatAttributeQuoteDescriptor>True</FormatAttributeQuoteDescriptor><CorrectVariableKindsDescriptor>True</CorrectVariableKindsDescriptor><VariablesToInnerScopesDescriptor>True</VariablesToInnerScopesDescriptor><StringToTemplatesDescriptor>True</StringToTemplatesDescriptor><JsReformatCode>True</JsReformatCode><JsFormatDocComments>True</JsFormatDocComments><RemoveRedundantQualifiersTs>True</RemoveRedundantQualifiersTs><OptimizeImportsTs>True</OptimizeImportsTs><OptimizeReferenceCommentsTs>True</OptimizeReferenceCommentsTs><PublicModifierStyleTs>True</PublicModifierStyleTs><ExplicitAnyTs>True</ExplicitAnyTs><TypeAnnotationStyleTs>True</TypeAnnotationStyleTs><RelativePathStyleTs>True</RelativePathStyleTs><AsInsteadOfCastTs>True</AsInsteadOfCastTs><HtmlReformatCode>True</HtmlReformatCode><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSMakeAutoPropertyGetOnly>True</CSMakeAutoPropertyGetOnly><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CssReformatCode>True</CssReformatCode><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments><CSReorderTypeMembers>True</CSReorderTypeMembers><XAMLCollapseEmptyTags>False</XAMLCollapseEmptyTags><CSReformatInactiveBranches>True</CSReformatInactiveBranches><CSharpReformatComments>True</CSharpReformatComments></Profile>
JADNC Full Cleanup
Required
Required
diff --git a/src/JsonApiDotNetCore.Annotations/TypeExtensions.cs b/src/JsonApiDotNetCore.Annotations/TypeExtensions.cs
index 61a173066c..0621760ac0 100644
--- a/src/JsonApiDotNetCore.Annotations/TypeExtensions.cs
+++ b/src/JsonApiDotNetCore.Annotations/TypeExtensions.cs
@@ -7,7 +7,7 @@ internal static class TypeExtensions
///
public static bool IsOrImplementsInterface(this Type? source)
{
- return IsOrImplementsInterface(source, typeof(TInterface));
+ return source.IsOrImplementsInterface(typeof(TInterface));
}
///
diff --git a/src/JsonApiDotNetCore/Configuration/ServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Configuration/ServiceCollectionExtensions.cs
index f82fcd3f23..e11a9f7170 100644
--- a/src/JsonApiDotNetCore/Configuration/ServiceCollectionExtensions.cs
+++ b/src/JsonApiDotNetCore/Configuration/ServiceCollectionExtensions.cs
@@ -21,7 +21,7 @@ public static IServiceCollection AddJsonApi(this IServiceCollection
Action? discovery = null, Action? resources = null, IMvcCoreBuilder? mvcBuilder = null)
where TDbContext : DbContext
{
- return AddJsonApi(services, options, discovery, resources, mvcBuilder, [typeof(TDbContext)]);
+ return services.AddJsonApi(options, discovery, resources, mvcBuilder, [typeof(TDbContext)]);
}
///
diff --git a/test/TestBuildingBlocks/DbContextExtensions.cs b/test/TestBuildingBlocks/DbContextExtensions.cs
index d3a8a0e8ad..45090ec8c1 100644
--- a/test/TestBuildingBlocks/DbContextExtensions.cs
+++ b/test/TestBuildingBlocks/DbContextExtensions.cs
@@ -13,14 +13,14 @@ public static void AddInRange(this DbContext dbContext, params object[] entities
public static async Task ClearTableAsync(this DbContext dbContext)
where TEntity : class
{
- await ClearTablesAsync(dbContext, typeof(TEntity));
+ await dbContext.ClearTablesAsync(typeof(TEntity));
}
public static async Task ClearTablesAsync(this DbContext dbContext)
where TEntity1 : class
where TEntity2 : class
{
- await ClearTablesAsync(dbContext, typeof(TEntity1), typeof(TEntity2));
+ await dbContext.ClearTablesAsync(typeof(TEntity1), typeof(TEntity2));
}
private static async Task ClearTablesAsync(this DbContext dbContext, params Type[] modelTypes)
@@ -40,7 +40,7 @@ private static async Task ClearTablesAsync(this DbContext dbContext, params Type
{
// There is no table for the specified abstract base type when using TablePerConcreteType inheritance.
IEnumerable derivedTypes = entityType.GetConcreteDerivedTypesInclusive();
- await ClearTablesAsync(dbContext, derivedTypes.Select(derivedType => derivedType.ClrType).ToArray());
+ await dbContext.ClearTablesAsync(derivedTypes.Select(derivedType => derivedType.ClrType).ToArray());
}
else
{
diff --git a/test/TestBuildingBlocks/FluentJsonElementExtensions.cs b/test/TestBuildingBlocks/FluentJsonElementExtensions.cs
index 76610ee881..a74dc735ea 100644
--- a/test/TestBuildingBlocks/FluentJsonElementExtensions.cs
+++ b/test/TestBuildingBlocks/FluentJsonElementExtensions.cs
@@ -18,7 +18,7 @@ public static JsonElementAssertions Should(this JsonElement source)
[CustomAssertion]
public static SchemaReferenceIdContainer ShouldBeSchemaReferenceId(this JsonElement source, string value)
{
- string schemaReferenceId = GetSchemaReferenceId(source);
+ string schemaReferenceId = source.GetSchemaReferenceId();
schemaReferenceId.Should().Be(value);
return new SchemaReferenceIdContainer(value);
@@ -38,7 +38,7 @@ public static string GetSchemaReferenceId(this JsonElement source)
[CustomAssertion]
public static void WithSchemaReferenceId(this JsonElement subject, [InstantHandle] Action continuation)
{
- string schemaReferenceId = GetSchemaReferenceId(subject);
+ string schemaReferenceId = subject.GetSchemaReferenceId();
continuation(schemaReferenceId);
}
diff --git a/test/TestBuildingBlocks/TimeExtensions.cs b/test/TestBuildingBlocks/TimeExtensions.cs
index 9392aa2d41..a4ed7b0950 100644
--- a/test/TestBuildingBlocks/TimeExtensions.cs
+++ b/test/TestBuildingBlocks/TimeExtensions.cs
@@ -12,7 +12,7 @@ public static DateTimeOffset TruncateToWholeMilliseconds(this DateTimeOffset val
// Because PostgreSQL does not store the UTC offset in the database, it cannot round-trip
// values with a non-zero UTC offset, and therefore always rejects such values.
- DateTime dateTime = TruncateToWholeMilliseconds(value.DateTime);
+ DateTime dateTime = value.DateTime.TruncateToWholeMilliseconds();
return new DateTimeOffset(dateTime, TimeSpan.Zero);
}