ARSoftware.Contpaqi.Contabilidad.Sql 3.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ARSoftware.Contpaqi.Contabilidad.Sql --version 3.1.1                
NuGet\Install-Package ARSoftware.Contpaqi.Contabilidad.Sql -Version 3.1.1                
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="ARSoftware.Contpaqi.Contabilidad.Sql" Version="3.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ARSoftware.Contpaqi.Contabilidad.Sql --version 3.1.1                
#r "nuget: ARSoftware.Contpaqi.Contabilidad.Sql, 3.1.1"                
#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 ARSoftware.Contpaqi.Contabilidad.Sql as a Cake Addin
#addin nuget:?package=ARSoftware.Contpaqi.Contabilidad.Sql&version=3.1.1

// Install ARSoftware.Contpaqi.Contabilidad.Sql as a Cake Tool
#tool nuget:?package=ARSoftware.Contpaqi.Contabilidad.Sql&version=3.1.1                

AR SOFTWARE CONTPAQI CONTABILIDAD SQL

Este proyecto contiene los DbContext para consultar las bases de datos de CONTPAQi Contabilidad. Podras consultar las bases de datos de Generales y de Empresas.

Instalaci�n

Puedes instalar el proyecto utilizando NuGet:

dotnet add package ARSoftware.Contpaqi.Contabilidad.Sql

Uso

Dependency Injection

Si utilizas Dependency Injection puedes agregar los DbContext con el contenedor de dependencias de tu proyecto. Para ello, puedes utilizar el siguiente c�digo:

public static IServiceCollection AddContpaqiContabilidadDbContexts(this IServiceCollection services, IConfiguration configuration)
{
    // Agrega implementaci�n de IEmpresaContabilidad
    services.AddSingleton<EmpresaSeleccionada>();
    services.AddSingleton<IEmpresaContabilidad>(provider => provider.GetRequiredService<EmpresaSeleccionada>());

    // Agrega Generales DbContext
    services.AddContpaqiContabilidadGeneralesDbContext(configuration.GetConnectionString("Contpaqi")!);

    // Agrega Empresa DbContext
    services.AddContpaqiContabilidadEmpresaDbContext(configuration.GetConnectionString("Contpaqi")!);

    return services;
}

Consulta las tablas generales

Para consultar la base de datos de tablas generales de CONTPAQi Contabilidad utiliza el DbContext ContpaqiContabilidadGeneralesDbContext.


```csharp
public sealed class BuscarEmpresasConDbContext
{
    private readonly ContpaqiContabilidadGeneralesDbContext _context;
    private readonly ILogger _logger;

    public BuscarEmpresasConDbContext(ContpaqiContabilidadGeneralesDbContext context, ILogger logger)
    {
        _context = context;
        _logger = logger;
    }

    public async Task<List<ListaEmpresas>> BuscarTodo()
    {
        List<ListaEmpresas> empresas = await _context.ListaEmpresas.OrderBy(empresa => empresa.Nombre).ToListAsync();

        _logger.LogInformation("{@Empresas}", empresas);

        return empresas;
    }
}

Consulta las tablas de la empresa

Para consultar la base de datos de tablas de la empresa de CONTPAQi Contabilidad utiliza el DbContext ContpaqiContabilidadEmpresaDbContext.

public sealed class BuscarTiposPolizaConDbContext
{
    private readonly ContpaqiContabilidadEmpresaDbContext _context;
    private readonly ILogger _logger;

    public BuscarTiposPolizaConDbContext(ContpaqiContabilidadEmpresaDbContext context, ILogger logger)
    {
        _context = context;
        _logger = logger;
    }

    public async Task<List<TiposPolizas>> BuscarTodo()
    {
        List<TiposPolizas> tiposPoliza = await _context.TiposPolizas.OrderBy(tipo => tipo.Nombre).ToListAsync();

        _logger.LogInformation("{@TiposPoliza}", tiposPoliza);

        return tiposPoliza;
    }
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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

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
3.2.1 141 2/21/2024
3.2.0 109 2/21/2024
3.1.1 191 8/19/2023
3.1.0 160 8/18/2023
3.0.0 156 8/18/2023
2.3.0 420 3/3/2023
2.2.0 258 3/2/2023
2.1.0 477 8/22/2022
2.0.0 425 8/9/2022