Holos.Foundation.Abp.EntityFrameworkCore 0.4.0

dotnet add package Holos.Foundation.Abp.EntityFrameworkCore --version 0.4.0
                    
NuGet\Install-Package Holos.Foundation.Abp.EntityFrameworkCore -Version 0.4.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.4.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.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Holos.Foundation.Abp.EntityFrameworkCore" />
                    
Project file
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.4.0
                    
#r "nuget: Holos.Foundation.Abp.EntityFrameworkCore, 0.4.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.4.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.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Holos.Foundation.Abp.EntityFrameworkCore&version=0.4.0
                    
Install as a Cake Tool

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) o IMayHaveCompany (long? CompanyId).
  • Toda consulta se filtra por la compañía activa; no hace falta Where(x => x.CompanyId == ...).
  • Al insertar, CompanyId se 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

  1. Registrar el filtro en PreInitialize del módulo: Configuration.UnitOfWork.RegisterCompanyFilter();
  2. En el DbContext, implementar ICompanyFilterContext y delegar tres métodos en CompanyScope. Ejemplo compilado: test/.../AbpIntegrationExample.cs.
  3. Procesos sin compañía (jobs, seeders, host): using (uow.Current.DisableFilter(CompanyFilter.Name)) { ... }.

Estado

  • Verificado: filtro por instancia de contexto, compañía opcional, asignación e rechazo en inserciones (8 pruebas con SQLite).
  • El ejemplo de AbpDbContext solo 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 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 94 11/15/2026
0.3.0 85 11/15/2026
0.2.0 84 11/15/2026
0.1.0 101 11/14/2026