40 lines
943 B
C#
40 lines
943 B
C#
using Dapper;
|
|
using Microsoft.Data.SqlClient;
|
|
using Serilog;
|
|
using Shared.DTO;
|
|
using Shared.DTO.Envios_DGA;
|
|
using Shared.DTO.VariablesEntorno;
|
|
|
|
namespace DAL
|
|
{
|
|
public class LogEnvioRepository
|
|
{
|
|
public async Task<bool> InsertarLogProcesoAsync(LogProceso log)
|
|
{
|
|
try
|
|
{
|
|
await using var connection = new SqlConnection(BdConexion.StringConnection);
|
|
|
|
var sql = @"
|
|
INSERT INTO dbo.DGA_LOGS_PROCESOS
|
|
(
|
|
NOMBRE_PROCESO,
|
|
FECHA_EJECUCION
|
|
)
|
|
VALUES
|
|
(
|
|
@NombreProceso,
|
|
@FechaEjecucion
|
|
);";
|
|
|
|
await connection.ExecuteAsync(sql, log);
|
|
return true;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|