Myth.Repository.EntityFramework
3.0.0.1-preview
dotnet add package Myth.Repository.EntityFramework --version 3.0.0.1-preview
NuGet\Install-Package Myth.Repository.EntityFramework -Version 3.0.0.1-preview
<PackageReference Include="Myth.Repository.EntityFramework" Version="3.0.0.1-preview" />
paket add Myth.Repository.EntityFramework --version 3.0.0.1-preview
#r "nuget: Myth.Repository.EntityFramework, 3.0.0.1-preview"
// Install Myth.Repository.EntityFramework as a Cake Addin #addin nuget:?package=Myth.Repository.EntityFramework&version=3.0.0.1-preview&prerelease // Install Myth.Repository.EntityFramework as a Cake Tool #tool nuget:?package=Myth.Repository.EntityFramework&version=3.0.0.1-preview&prerelease
Myth.Repository.EntityFramework
It is a .NET library for defining database access repositories using Entity Framework.
⭐ Features
- Definition of base context
- Automatic reading of entity mapping files
- Writing implementation
- Implementation of reading using expressions
- Implementation of reading using specification
- Work with transactions
🔮 Usage
To use it, simply inherit the created context from BaseContext. After that, just create the repositories by passing it as a parameter.
🕶️ Reading'
Several methods can be used to read:
GetProviderName
: Returns the database connection providerAsQueryable
: Returns a collection for execution in the databaseAsEnumerable
: Returns a collection for execution in memory]ToListAsync
: Returns all items in the collectionWhere
: Returns the collection with a filterSearchAsync
: Returns the filtered collectionSearchPaginatedAsync
: Returns the filtered and paginated collectionCountAsync
: Counts the items in the collectionAnyAsync
: Checks if any item in the collection meets a requirementAllAsync
: Checks whether all items in the collection meet a requirementFirstOrDefaultAsync
: Returns the first item in the collectionLastOrDefaultAsync
: Returns the last item in the collection
✍️ Writing
The following methods can be used for writing:
AddAsync
: Adds an item to the collectionAddRangeAsync
: Adds multiple items to the collectionRemoveAsync
: Removes an item from the collectionRemoveRangeAsync
: Removes multiple items from the collectionUpdateAsync
: Updates a collection itemUpdateRangeAsync
: Updates multiple items in the collectionAttachAsync
: Attach an item to the collectionAttachRangeAsync
: Attach multiple items to the collectionSaveChangesAsync
: Saves all changesExecuteSqlRawAsync
: Executes a query in the database
🪄 Unit of work
The entity's independent functionalities are as follows:
SaveChangesAsync
: Saves all changesExecuteSqlRawAsync
: Executes a query in the databaseBeginTransactionAsync
: Starts a transactionCommitAsync
: Executes all transaction changesRollbackAsync
: Undoes transaction changesCreateSavepointAsync
: Creates a transaction checkpointRollbackToSavepointAsync
: Returns to a t'ransaction checkpoint
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.6)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.6)
- Myth.Repository (>= 3.0.0.1-preview)
- Myth.Specification (>= 3.0.0.1-preview)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Myth.Repository.EntityFramework:
Package | Downloads |
---|---|
Harpy.Domain
Basis for the domain layer of the Harpy Framework |
|
Harpy.Context
Basis for the context layer of the Harpy Framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.0.1-preview | 98 | 6/29/2024 |
3.0.0-preview | 92 | 6/28/2024 |
2.0.0.17 | 1,174 | 4/17/2024 |
2.0.0.16 | 3,049 | 12/15/2023 |
2.0.0.15 | 132 | 12/15/2023 |
2.0.0.11 | 3,411 | 8/11/2022 |
2.0.0.10 | 2,387 | 7/20/2022 |
2.0.0.9 | 2,493 | 7/15/2022 |
2.0.0.8 | 2,524 | 7/12/2022 |
2.0.0.7 | 2,445 | 6/20/2022 |
2.0.0.6 | 2,496 | 5/23/2022 |
2.0.0.5 | 2,489 | 5/18/2022 |
2.0.0 | 2,592 | 2/17/2022 |