AdministradorSQL 1.0.0.4

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

// Install AdministradorSQL as a Cake Tool
#tool nuget:?package=AdministradorSQL&version=1.0.0.4                

INTRODUCCION

NAMESPACE NECESARIOS

1.- using AdministradorSQL.Builders;
2.- using AdministradorSQL.Interfaces;

CREACION DE CONEXION

IConnectionBuilder _builder = new ConnectionBuilder();
_builder.SetInfoConexion("YourServidor", "YourBD", "YourUser", "YourPassword");

CREACION DE CONSULTA SQL || STORE PROCEDURE

NOTA: LA DLL PUEDE MANDAR CLASES COMO OBJECTO GENERICO

CREACION DE CLASE

internal class Usuario
{
    public string Name { get; set; }
    public int Id { get; set; }
    public string Title { get; set; }
    public DateTime Created { get; set; }
}

CONSULTA SIMPLE

Usuario user = _builder.FirstOrDefaultQuery<Usuario>(@"SELECT Name, Id, Title, Created FROM Usuario");

CONSULTA CON PARAMETROS

Dictionary<string, object> parametros = new Dictionary<string, object>();
parametros.Add("@ID", 1);
user = _builder.FirstOrDefaultQuery<Usuario>(@"SELECT * FROM Usuario WHERE Id = @ID", parametros);

CONSULTA DE LISTA DE CLASE SIMPLE

List<Usuario> users = _builder.ToListStoreProcedure<Usuario>(@"Your Store Procedure").ToList();

CONSULTA DE LISTA DE CLASE CON PARAMETROS

users = _builder.ToListStoreProcedurFunc<Usuario>((lista) => new Usuario
{
    Name = lista.GetValue<string>("Name"),
    Id = lista.GetValue<int>("ID"),
    Created  = lista.GetValue<DateTime>("Created"),
    Title = lista.GetValue<string>("Title"),
}, @"Your Store Procedure With Parameters", parametros).ToList();

CONTACTO

- skallivurtrower@gmail.com
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

    • No dependencies.

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
1.0.0.5 455 8/24/2022
1.0.0.4 403 8/18/2022
1.0.0.3 417 8/17/2022
1.0.0.2 376 8/17/2022
1.0.0.1 407 8/16/2022
1.0.0 409 8/15/2022

Summary of changes made in this release of the package.