diff --git a/src/Marten/Events/CodeGeneration/EventDocumentStorageGenerator.cs b/src/Marten/Events/CodeGeneration/EventDocumentStorageGenerator.cs index 27473a62b2..e5a44051a8 100644 --- a/src/Marten/Events/CodeGeneration/EventDocumentStorageGenerator.cs +++ b/src/Marten/Events/CodeGeneration/EventDocumentStorageGenerator.cs @@ -278,7 +278,7 @@ private static GeneratedType buildAppendEventOperation(EventGraph graph, Generat var columns = new EventsTable(graph).SelectColumns() // Hokey, use an explicit model for writeable vs readable columns some day - .Where(x => !(x is IsArchivedColumn)).ToList(); + .Where(x => x is not IsArchivedColumn).ToList(); // Hokey, but we need to move Sequence to the end var sequence = columns.OfType().Single(); diff --git a/src/Marten/Internal/CodeGeneration/BulkLoaderBuilder.cs b/src/Marten/Internal/CodeGeneration/BulkLoaderBuilder.cs index a190088e6d..c604cbcc0e 100644 --- a/src/Marten/Internal/CodeGeneration/BulkLoaderBuilder.cs +++ b/src/Marten/Internal/CodeGeneration/BulkLoaderBuilder.cs @@ -71,7 +71,7 @@ public GeneratedType BuildType(GeneratedAssembly assembly) private static List orderArgumentsForBulkWriting(UpsertFunction upsertFunction) { - var arguments = upsertFunction.OrderedArguments().Where(x => !(x is CurrentVersionArgument)).ToList(); + var arguments = upsertFunction.OrderedArguments().Where(x => x is not CurrentVersionArgument).ToList(); // You need the document body to go last so that any metadata pushed into the document // is serialized into the JSON data var body = arguments.OfType().Single(); diff --git a/src/Marten/Internal/CompiledQueries/CompiledQueryPlan.cs b/src/Marten/Internal/CompiledQueries/CompiledQueryPlan.cs index af41e6b521..28550a38e4 100644 --- a/src/Marten/Internal/CompiledQueries/CompiledQueryPlan.cs +++ b/src/Marten/Internal/CompiledQueries/CompiledQueryPlan.cs @@ -281,7 +281,7 @@ public ICompiledQuery CreateQueryTemplate(ICompiledQuery { foreach (var parameter in QueryMembers) parameter.StoreValue(query); - if (!(query is IQueryPlanning) && areAllMemberValuesUnique(query)) + if (query is not IQueryPlanning && areAllMemberValuesUnique(query)) { return query; } diff --git a/src/Marten/Internal/Sessions/OperationPage.cs b/src/Marten/Internal/Sessions/OperationPage.cs index 0d618ef2ba..31b9b4beb9 100644 --- a/src/Marten/Internal/Sessions/OperationPage.cs +++ b/src/Marten/Internal/Sessions/OperationPage.cs @@ -70,7 +70,7 @@ public void ApplyCallbacks(DbDataReader reader, { var first = _operations.First(); - if (!(first is NoDataReturnedCall)) + if (first is not NoDataReturnedCall) { first.Postprocess(reader, exceptions); try @@ -119,7 +119,7 @@ public async Task ApplyCallbacksAsync(DbDataReader reader, { var first = _operations.First(); - if (!(first is NoDataReturnedCall)) + if (first is not NoDataReturnedCall) { await first.PostprocessAsync(reader, exceptions, token).ConfigureAwait(false); try diff --git a/src/Marten/Linq/Parsing/SimpleExpression.cs b/src/Marten/Linq/Parsing/SimpleExpression.cs index 33453f8cbd..4679359396 100644 --- a/src/Marten/Linq/Parsing/SimpleExpression.cs +++ b/src/Marten/Linq/Parsing/SimpleExpression.cs @@ -328,7 +328,7 @@ protected override Expression VisitMethodCall(MethodCallExpression node) return null; } - if (node.Object == null && !(node.Arguments.FirstOrDefault() is MemberExpression)) + if (node.Object == null && node.Arguments.FirstOrDefault() is not MemberExpression) { // It's a method of a static, so this has to be a constant HasConstant = true;