Skip to content

Commit

Permalink
Enhanced query handling and multi-targeting
Browse files Browse the repository at this point in the history
- Added `ProcessLogicalAnd` in `ContentItemQueryExpressionVisitor.cs` to support logical AND operations in binary expressions, enhancing query capabilities.
- Modified `Take` method in `PageContentContext.cs` to properly initialize and limit query results, replacing the previous `NotImplementedException`.
- Updated `XperienceCommunity.DataContext.csproj` to target both `net6.0` and `net8.0`, allowing compatibility with more .NET versions.
- General updates to `packages.lock.json` for dependency version management, including version updates, new dependencies, removals, resolution changes, and checksum updates to ensure project stability and security.
  • Loading branch information
bluemodus-brandon committed Jul 7, 2024
1 parent 4c5cc67 commit 8257766
Show file tree
Hide file tree
Showing 4 changed files with 565 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ private void ProcessEquality(BinaryExpression node)
throw new NotSupportedException(
$"The left expression type '{node.Left.GetType().Name}' is not supported.");
}
}
}

private void ProcessLogicalAnd(BinaryExpression node)
{
Expand Down
6 changes: 5 additions & 1 deletion src/XperienceCommunity.DataContext/PageContentContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ public IDataContext<T> OrderBy<TKey>(Expression<Func<T, TKey>> keySelector)

public IDataContext<T> Take(int count)
{
throw new NotImplementedException();
InitializeQuery();

_query = _query?.Take(count);

return this;
}

public async Task<IEnumerable<T>> ToListAsync(CancellationToken cancellationToken = default)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Loading

0 comments on commit 8257766

Please sign in to comment.