Myth.Repository.EntityFramework 3.0.0.1-preview

This is a prerelease version of Myth.Repository.EntityFramework.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Myth.Repository.EntityFramework --version 3.0.0.1-preview                
NuGet\Install-Package Myth.Repository.EntityFramework -Version 3.0.0.1-preview                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Myth.Repository.EntityFramework" Version="3.0.0.1-preview" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Myth.Repository.EntityFramework --version 3.0.0.1-preview                
#r "nuget: Myth.Repository.EntityFramework, 3.0.0.1-preview"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

NuGet Version NuGet Version

License

pt-br en

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 provider
  • AsQueryable: Returns a collection for execution in the database
  • AsEnumerable: Returns a collection for execution in memory]
  • ToListAsync: Returns all items in the collection
  • Where: Returns the collection with a filter
  • SearchAsync: Returns the filtered collection
  • SearchPaginatedAsync: Returns the filtered and paginated collection
  • CountAsync: Counts the items in the collection
  • AnyAsync: Checks if any item in the collection meets a requirement
  • AllAsync: Checks whether all items in the collection meet a requirement
  • FirstOrDefaultAsync: Returns the first item in the collection
  • LastOrDefaultAsync: Returns the last item in the collection

✍️ Writing

The following methods can be used for writing:

  • AddAsync: Adds an item to the collection
  • AddRangeAsync: Adds multiple items to the collection
  • RemoveAsync: Removes an item from the collection
  • RemoveRangeAsync: Removes multiple items from the collection
  • UpdateAsync: Updates a collection item
  • UpdateRangeAsync: Updates multiple items in the collection
  • AttachAsync: Attach an item to the collection
  • AttachRangeAsync: Attach multiple items to the collection
  • SaveChangesAsync: Saves all changes
  • ExecuteSqlRawAsync: Executes a query in the database

🪄 Unit of work

The entity's independent functionalities are as follows:

  • SaveChangesAsync: Saves all changes
  • ExecuteSqlRawAsync: Executes a query in the database
  • BeginTransactionAsync: Starts a transaction
  • CommitAsync: Executes all transaction changes
  • RollbackAsync: Undoes transaction changes
  • CreateSavepointAsync: Creates a transaction checkpoint
  • RollbackToSavepointAsync: Returns to a t'ransaction checkpoint
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2-preview 65 12/10/2024
3.0.0.1-preview 100 6/29/2024
3.0.0 228 12/10/2024
3.0.0-preview 95 6/28/2024
2.0.0.17 1,452 4/17/2024
2.0.0.16 3,193 12/15/2023
2.0.0.15 134 12/15/2023
2.0.0.11 3,415 8/11/2022
2.0.0.10 2,389 7/20/2022
2.0.0.9 2,495 7/15/2022
2.0.0.8 2,526 7/12/2022
2.0.0.7 2,447 6/20/2022
2.0.0.6 2,498 5/23/2022
2.0.0.5 2,491 5/18/2022
2.0.0 2,594 2/17/2022