This file contains 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 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 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 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 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 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 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`, |
This file contains 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`, |
This file contains 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`, |
This file contains 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, | |
$shows = d.getElementById("shows"), | |
$template = d.getElementById("show-template"), | |
$fragment = d.createDocumentFragment(); | |
d.addEventListener("keypress", async (e) => { | |
if (e.target.matches("#search")) { | |
// console.log(e.key, e.keyCode); | |
if (e.key === "Enter") { | |
try { |
NewerOlder