Verify.EntityFramework/readme.source.md

2.6 KiB

Verify.EntityFramework

Build status NuGet Status NuGet Status

Extends Verify to allow verification of EntityFramework bits.

Support is available via a Tidelift Subscription.


Part of the .NET Foundation

toc

NuGet package

Usage

Enable VerifyEntityFramewok once at assembly load time:

EF Core

snippet: EnableCore

EF Classic

snippet: EnableClassic

ChangeTracking

Added, deleted, and Modified entities can be verified by performing changes on a DbContext and then verifying the instance of ChangeTracking. This approach leverages the EntityFramework ChangeTracker.

Added entity

This test:

snippet: Added

Will result in the following verified file:

snippet: CoreTests.Added.verified.txt

Deleted entity

This test:

snippet: Deleted

Will result in the following verified file:

snippet: CoreTests.Deleted.verified.txt

Modified entity

This test:

snippet: Modified

Will result in the following verified file:

snippet: CoreTests.Modified.verified.txt

Queryable

This test:

snippet: Queryable

Will result in the following verified file:

EF Core

snippet: CoreTests.Queryable.verified.txt

EF Classic

snippet: ClassicTests.Queryable.verified.txt

Security contact information

To report a security vulnerability, use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Icon

Database designed by Creative Stall from The Noun Project.