This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker pull container-registry.oracle.com/database/express:latest | |
docker run --name oracle_docker_xe2 -p 1522:1521 -e ORACLE_PWD=dbdev container-registry.oracle.com/database/express:21.3.0-xe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE customers ( | |
customer_id NUMBER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, | |
customer_name VARCHAR2(250) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scaffold-DbContext "Server=LAPTOP-S8HOTDC5\SQLEXPRESS;Database=Empresa1;User ID=sa; password=dbdev; TrustServerCertificate=True;" Microsoft.EntityFrameWorkCore.SqlServer -Tables "dbo.T_EMPLEADOS","dbo.T_CAT_PUESTO" -Context EmpresaContext -ContextDir Models -OutputDir Models -NoPluralize -Force | |
/*Inyectar Connection string a program*/ | |
builder.Services.AddDbContext<DBTESTContext>(opcion => | |
{ | |
opcion.UseSqlServer(builder.Configuration.GetConnectionString("dbCon")); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [DB_desde_transact] | |
GO | |
/****** Object: StoredProcedure [dbo].[spUsuariosInsertar] Script Date: 05/11/2024 03:52:16 p. m. ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
ALTER PROCEDURE [dbo].[spUsuariosInsertar] | |
( | |
@Email varchar(250), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//En el método constructor se cargará la URL de la web api que se especifico en appsettings.json | |
//para esto se utiliza un objeto ConfigurationBuilder | |
var builder = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json").Build(); | |
_urlWebAPI = builder.GetSection("urlWebAPI").Value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BLAlumnos | |
{ | |
private string _urlWebAPI; | |
public BLAlumnos() { } | |
public async Task<List<Alumnos>> Consultar() { } | |
public async Task<Alumnos> Consultar(int? id) { } | |
public async Task<Alumnos> Agregar(Alumnos alumnos) { } | |
public async Task Actualizar(Alumnos alumnos) { } | |
public async Task Eliminar(int id) { } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add services to the container. | |
builder.Services.AddDbContext<NameContext>(options => | |
options.UseSqlServer(builder.Configuration.GetConnectionString("DBConnectionName"))); | |
// Add Authorization services | |
builder.Services.AddAuthorization(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scaffold-DbContext "Server=LAPTOP-S8HOTDC5\SQLEXPRESS;Database=DBName;User ID=sa; password=password;" Microsoft.EntityFrameWorkCore.SqlServer -Tables TableName -Context NameContext -ContextDir Models/Context -OutputDir Models/Entities -NoPluralize -Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function eventManager(){ | |
let executing = false; | |
return async ()=>{ | |
if(!executing){ | |
executing = true; | |
await fn(); | |
setTimeout(()=>{executing = false},2000); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const d = document, | |
$site = d.getElementById("site"), | |
$posts = d.getElementById("posts"), | |
$loader = d.querySelector(".loader"), | |
$template = d.getElementById("post-template"), | |
$fragment = d.createDocumentFragment(), | |
DOMAIN = "https://malvestida.com", | |
SITE = `${DOMAIN}/wp-json`, | |
API_WP = `${SITE}/wp/v2`, | |
POSTS = `${API_WP}/posts?_embed`, |
NewerOlder