AdministradorSQL 1.0.0.5

dotnet add package AdministradorSQL --version 1.0.0.5
NuGet\Install-Package AdministradorSQL -Version 1.0.0.5
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.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AdministradorSQL --version 1.0.0.5
#r "nuget: AdministradorSQL, 1.0.0.5"
#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.5

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

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>(@"SELECT Name, Id, Title, Created FROM Usuario").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"),
}, @"SELECT * FROM Usuario WHERE Id = @ID", parametros).ToList();
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 414 8/24/2022
1.0.0.4 371 8/18/2022
1.0.0.3 383 8/17/2022
1.0.0.2 356 8/17/2022
1.0.0.1 376 8/16/2022
1.0.0 378 8/15/2022

Mapeo de Clases, por uso de Funciones e implementacion de Tareas