Skip to content

Conversation

@Catlandor
Copy link
Contributor

PR Details

  • Update all NuGet packages
  • Upgrade .NET version from 6 to 8
  • New feature: Support for custom ExpressionVisitor

Description

Update all NuGet packages

All NuGet packages have been updated to their latest versions. The most significant change was upgrading the AutoMapper library from 8.0.0 to 15.0.1. The code was adjusted for compatibility with the new version, while maintaining previous behavior.

Upgrade .NET version from 6 to 8

Upgrading to .NET 8 was necessary to ensure compatibility with the latest NuGet packages.

New feature: Support for custom ExpressionVisitor

A new overload for BuildMockDbSet allows consumers to define and pass a custom ExpressionVisitor. This enables scenarios such as mocking expressions like EF.Functions.ILike and more. The new generic parameter TExpressionVisitor makes this possible.

This approach is intentionally flexible, rather than implementing a fake for each EF.Function, as there are many possible functions and covering every use case is not feasible.

Related Issue

Update of packages:
#82

Custom ExpressionVisitor:
#73

How Has This Been Tested

  • Created new unit tests for all three variants to ensure the feature is working as expected, additionally using a sample implementation for a new visitor mocking EF.Functions.ILike (see SampleILikeExpressionVisitor)
  • Created an overload of the public methods to keep the existing usages unaffetced.
  • Ensured all new unit tests passed and that existing tests remained unaffected.

Checklist

  • My code follows the code style of this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Catlandor
Copy link
Contributor Author

If preferred, I can split this pull request into two separate ones: one for the NuGet package updates and another for the ExpressionVisitor changes.
Currently, I have separated these changes into two commits within this PR, so they can still be reviewed individually.

@romantitov romantitov self-assigned this Jul 21, 2025
@romantitov
Copy link
Owner

Hello @Catlandor thanks for the PR and your effort.
I think split into two PRs is not necessary.
I'm quite busy with my other projects right now, but I will try to find some time for the PR during the week.
Thanks for understanding.

@Catlandor
Copy link
Contributor Author

Hi @romantitov
Sure, no problem! If anything seems off, or if there are any alternative thoughts about the architecture, I’m happy to help or adjust the PR accordingly.

@romantitov romantitov changed the base branch from master to feature/ExecuteAsync July 21, 2025 20:07
@romantitov romantitov changed the base branch from feature/ExecuteAsync to 73_ExpressionVisitor July 21, 2025 20:12
@romantitov romantitov merged commit 1455ff7 into romantitov:73_ExpressionVisitor Jul 21, 2025
1 check passed
@romantitov
Copy link
Owner

Thanks @Catlandor. I've merged the PR to a separate branch, but I will need some time to adjust it and prepare a new release with your changes. Thanks for understanding.

@Catlandor
Copy link
Contributor Author

Awesome, thank you @romantitov, also for this useful library!

renebentes pushed a commit to renebentes/3054 that referenced this pull request Aug 5, 2025
Updated
[MockQueryable.NSubstitute](https://github.com/romantitov/MockQueryable)
from 7.0.3 to 8.0.0.

<details>
<summary>Release notes</summary>

_Sourced from [MockQueryable.NSubstitute's
releases](https://github.com/romantitov/MockQueryable/releases)._

## 8.0.0


## What's Changed
#​81 Add support to ExecuteDelete and ExecuteUpdate - Thanks
@​lazaro-ansaldi and @​Catlandor
#​82 Update versions of Moq, NSubstitute and FakeItEasy to newer
versions without known vulnerabilities - Thanks @​Catlandor
#​73 Supporting EF.Functions.Like and/or prossibility to provide cusotm
ExpressionVisitor - Thanks @​Catlandor
#​66 Not suported with EF7: ExecuteDeleteAsync and ExecuteUpdateAsync -
Thanks @​Catlandor

## New Contributors
* @​lazaro-ansaldi made their first contribution in
romantitov/MockQueryable#81
* @​Catlandor made their first contribution in
romantitov/MockQueryable#84

**Full Changelog**:
romantitov/MockQueryable@v7.0.3...v8.0.0

## 7.0.4-beta

## What's Changed
* Altered namespace for extension method to revert a breaking change wi…
by @​StevePy in romantitov/MockQueryable#80

## New Contributors
* @​StevePy made their first contribution in
romantitov/MockQueryable#80

**Full Changelog**:
romantitov/MockQueryable@v7.0.2...7.0.4-beta

Commits viewable in [compare
view](romantitov/MockQueryable@v7.0.3...v8.0.0).
</details>

Updated [Roslynator.Analyzers](https://github.com/dotnet/roslynator)
from 4.13.1 to 4.14.0.

<details>
<summary>Release notes</summary>

_Sourced from [Roslynator.Analyzers's
releases](https://github.com/dotnet/roslynator/releases)._

## 4.14.0

### Added

- [CLI] Add support for GitLab analyzer reports
([PR](dotnet/roslynator#1633))

### Fixed

- Fix analyzer
[RCS1264](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1264)
([PR](dotnet/roslynator#1666))
- Fix analyzer
[RCS1229](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1229)
([PR](dotnet/roslynator#1667))
- Fix analyzer
[RCS1250](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1250)
([PR](dotnet/roslynator#1652) by @​aihnatiuk)
- Fix analyzer
[RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260)
([PR](dotnet/roslynator#1668))
- Fix analyzer
[RCS1105](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1105)
([PR](dotnet/roslynator#1669))
- Fix analyzer
[RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260)
([PR](dotnet/roslynator#1672))

### Changed

- Disable analyzer
[RCS1036](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1036)
by default ([PR](dotnet/roslynator#1671))
- Use analyzer
[RCS0063](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0063)
instead

### Removed

- Remove legacy config options
([PR](dotnet/roslynator#1304))


Commits viewable in [compare
view](dotnet/roslynator@v4.13.1...v4.14.0).
</details>

Updated
[Roslynator.CodeAnalysis.Analyzers](https://github.com/dotnet/roslynator)
from 4.13.1 to 4.14.0.

<details>
<summary>Release notes</summary>

_Sourced from [Roslynator.CodeAnalysis.Analyzers's
releases](https://github.com/dotnet/roslynator/releases)._

## 4.14.0

### Added

- [CLI] Add support for GitLab analyzer reports
([PR](dotnet/roslynator#1633))

### Fixed

- Fix analyzer
[RCS1264](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1264)
([PR](dotnet/roslynator#1666))
- Fix analyzer
[RCS1229](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1229)
([PR](dotnet/roslynator#1667))
- Fix analyzer
[RCS1250](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1250)
([PR](dotnet/roslynator#1652) by @​aihnatiuk)
- Fix analyzer
[RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260)
([PR](dotnet/roslynator#1668))
- Fix analyzer
[RCS1105](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1105)
([PR](dotnet/roslynator#1669))
- Fix analyzer
[RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260)
([PR](dotnet/roslynator#1672))

### Changed

- Disable analyzer
[RCS1036](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1036)
by default ([PR](dotnet/roslynator#1671))
- Use analyzer
[RCS0063](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0063)
instead

### Removed

- Remove legacy config options
([PR](dotnet/roslynator#1304))


Commits viewable in [compare
view](dotnet/roslynator@v4.13.1...v4.14.0).
</details>

Updated
[Roslynator.Formatting.Analyzers](https://github.com/dotnet/roslynator)
from 4.13.1 to 4.14.0.

<details>
<summary>Release notes</summary>

_Sourced from [Roslynator.Formatting.Analyzers's
releases](https://github.com/dotnet/roslynator/releases)._

## 4.14.0

### Added

- [CLI] Add support for GitLab analyzer reports
([PR](dotnet/roslynator#1633))

### Fixed

- Fix analyzer
[RCS1264](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1264)
([PR](dotnet/roslynator#1666))
- Fix analyzer
[RCS1229](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1229)
([PR](dotnet/roslynator#1667))
- Fix analyzer
[RCS1250](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1250)
([PR](dotnet/roslynator#1652) by @​aihnatiuk)
- Fix analyzer
[RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260)
([PR](dotnet/roslynator#1668))
- Fix analyzer
[RCS1105](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1105)
([PR](dotnet/roslynator#1669))
- Fix analyzer
[RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260)
([PR](dotnet/roslynator#1672))

### Changed

- Disable analyzer
[RCS1036](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1036)
by default ([PR](dotnet/roslynator#1671))
- Use analyzer
[RCS0063](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0063)
instead

### Removed

- Remove legacy config options
([PR](dotnet/roslynator#1304))


Commits viewable in [compare
view](dotnet/roslynator@v4.13.1...v4.14.0).
</details>

Updated
[xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit)
from 3.1.2 to 3.1.3.

<details>
<summary>Release notes</summary>

_Sourced from [xunit.runner.visualstudio's
releases](https://github.com/xunit/visualstudio.xunit/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/xunit/visualstudio.xunit/commits).
</details>

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants