Holos.Foundation.Abp.EntityFrameworkCore
0.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Holos.Foundation.Abp.EntityFrameworkCore --version 0.1.0
NuGet\Install-Package Holos.Foundation.Abp.EntityFrameworkCore -Version 0.1.0
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="Holos.Foundation.Abp.EntityFrameworkCore" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Holos.Foundation.Abp.EntityFrameworkCore" Version="0.1.0" />
<PackageReference Include="Holos.Foundation.Abp.EntityFrameworkCore" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Holos.Foundation.Abp.EntityFrameworkCore --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Holos.Foundation.Abp.EntityFrameworkCore, 0.1.0"
#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.
#:package Holos.Foundation.Abp.EntityFrameworkCore@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Holos.Foundation.Abp.EntityFrameworkCore&version=0.1.0
#tool nuget:?package=Holos.Foundation.Abp.EntityFrameworkCore&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Holos.Foundation
Piezas reutilizables para aplicaciones sobre ASP.NET Boilerplate (Abp.*) que quitan código repetido.
Es una librería nueva, no un fork de ABP: se apoya en los puntos de extensión que ABP ya expone.
Holos.Foundation.Abp.EntityFrameworkCore
Compañía activa implícita, igual que ABP hace con el inquilino.
- Las entidades implementan
IMustHaveCompany(long CompanyId) oIMayHaveCompany(long? CompanyId). - Toda consulta se filtra por la compañía activa; no hace falta
Where(x => x.CompanyId == ...). - Al insertar,
CompanyIdse completa con la compañía activa. Con el filtro activo, una compañía distinta se rechaza. - Sin compañía activa y con el filtro activo, las consultas no devuelven filas (cierra por defecto).
Uso
- Registrar el filtro en
PreInitializedel módulo:Configuration.UnitOfWork.RegisterCompanyFilter(); - En el
DbContext, implementarICompanyFilterContexty delegar tres métodos enCompanyScope. Ejemplo compilado:test/.../AbpIntegrationExample.cs. - Procesos sin compañía (jobs, seeders, host):
using (uow.Current.DisableFilter(CompanyScope.FilterName)) { ... }.
Estado
- Verificado: filtro por instancia de contexto, compañía opcional, asignación e rechazo en inserciones (8 pruebas con SQLite).
- El ejemplo de
AbpDbContextsolo se compila contra Abp.EntityFrameworkCore 10.3.0; no se ha ejecutado dentro de una aplicación ABP. - Pendiente: probar en un módulo real de HolosCoreOps, y varias compañías por consulta (
companyIds).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Abp.EntityFrameworkCore (>= 10.3.0)
- Holos.Foundation.Abp.Domain (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.