Skip to content

Instantly share code, notes, and snippets.

View carloswm85's full-sized avatar
🎯
Compiling...

Carlos W. Mercado carloswm85

🎯
Compiling...
View GitHub Profile

Admin User Complete Lifecycle Flow

Sequence diagram showing the complete lifecycle of an admin user from login to logout, including all CRUD operations. This format is perfect for showing the temporal flow and interactions between components.

What the Diagram Shows:

🔵 Authentication Phase (Steps 1-6)

  • User enters credentials
  • System validates and creates claims (including "Admin" role)
  • Token/cookie is generated and sent to user
@carloswm85
carloswm85 / ntier-architecture-explanation.md
Last active December 11, 2025 16:00
This document provides a complete, end-to-end explanation of Layered (N-Tier) Architecture in .NET Core, demonstrating how responsibilities are separated into Presentation, Application, Business Logic, Data Access, and Database layers. It illustrates each layer with real-world controller, service, manager, and repository code, explains how depen…

https://www.perplexity.ai/search/level-layers-functionality-tec-XUGF.P3OQ222h9LUWsYxIw#3

"Supplement with specific repositories for complex queries" means that besides having a general, often generic repository for simple CRUD operations, you create specialized repository classes to handle more elaborate and performance-sensitive data retrieval needs that don't fit well into simple CRUD patterns. These specialized repositories encapsulate complex querying logic, using techniques like joins, projections, or raw SQL for efficiency.

Examples and Patterns:

  1. Specific Repository for Complex Queries
    • For example, you might have a generic IRepository<T> for basic CRUD, but also an IInvoiceRepository with methods like:

public interface IInvoiceRepository : IRepository

@carloswm85
carloswm85 / UpperCaseAttribute.cs
Created October 11, 2025 20:17 — forked from pazteddy/UpperCaseAttribute.cs
Atributo personalizado para convertir un texto a mayúsculas
[AttributeUsage(AttributeTargets.Property)]
public class UpperCaseAttribute : Attribute
{
}
public static class AttributeProcessor
{
public static void ApplyUpperCase(object obj)
{
@carloswm85
carloswm85 / PdfProtection.cs
Created September 25, 2025 13:01
The `PdfProtection` class is a utility for creating and managing password-protected PDF documents using iText 7, offering configurable security through encryption levels (40-bit, 128-bit, AES-128, AES-256) and fine-grained permission flags (printing, copying, modifying, annotating, filling forms, etc.). It allows both synchronous and asynchronou…
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using iText.Kernel.Exceptions;
using iText.Kernel.Pdf;
using iText.Kernel.Pdf.Canvas.Draw;
using iText.Layout;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using iText.Kernel.Geom;
using iText.Kernel.Pdf;
using iText.Kernel.Pdf.Canvas.Draw;
using iText.Layout;
using iText.Layout.Element;
using iText.Layout.Properties;
@carloswm85
carloswm85 / Instalaciones-DotNET.md
Created September 18, 2025 23:12 — forked from pazteddy/Instalaciones-DotNET.md
Instalaciones recomendadas para el curso .NET Backend: .NET Core, SQL Server y seguridad JWT
// Mask the field for the GDE file name input https://stackoverflow.com/a/56704775/7389293
$('.cuitcuil-mask').mask('00-00000000-0', {
'translation': {
//'#': { pattern: /#/, fallback: '#', optional: false },
},
placeholder: "__-________-_"
});
<mat-card class="mb4">
<mat-list>
<mat-list-item>
<span class="underline-and-strong">ERC</span>:
<span class="low-ranking">LR-1</span> •
<span class="low-ranking">LR-2</span> •
<span class="medium-low-ranking">MLR-1</span> •
<span class="medium-low-ranking border-bottom">MLR-2</span> •
<span class="medium-high-ranking">MHR-1</span> •
<span class="medium-high-ranking">MHR-2</span> •