Skip to content

Instantly share code, notes, and snippets.

View jesulink2514's full-sized avatar
🎯
Focusing

Jesus Angulo jesulink2514

🎯
Focusing
View GitHub Profile
@jesulink2514
jesulink2514 / fix_git_firewall.bat
Last active September 2, 2015 19:25
Como remapear el protocolo git a https
//Remapear el protocolo git a https
git config --global url."https://".insteadOf git://
//listar las configuraciones globales de git
git config --list
@jesulink2514
jesulink2514 / IViewEngine.cs
Last active May 5, 2021 14:19
Sample code of ASP.net MVC IViewEngine interface
namespace System.Web.Mvc
{
public interface IViewEngine
{
ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache);
ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache);
void ReleaseView(ControllerContext controllerContext, IView view);
}
@jesulink2514
jesulink2514 / ThemeViewEngine.cs
Last active December 22, 2015 04:08
Motor de vista con soporte para temas
using System;
using System.Web;
using System.Web.Mvc;
namespace MvcThemeable.Infraestructura
{
public class ThemeViewEngine: RazorViewEngine
{
public ThemeViewEngine(string tema)
{
@jesulink2514
jesulink2514 / Global.asax.cs
Last active December 22, 2015 04:13
Contenido del archivo global.asax para el motor de vistas con soporte para temas
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using MvcThemeable.Infraestructura;
@jesulink2514
jesulink2514 / Audit.PizzaController.cs
Created January 3, 2016 20:17
Controlador con auditoria manual
using System.Web.Mvc;
using AuditSample.Models;
using Microsoft.AspNet.Identity;
namespace AuditSample.Controllers
{
[Authorize]
public class PizzaController : Controller
{
private readonly IApplicationService _applicationService;
@jesulink2514
jesulink2514 / IActionFilter.cs
Created January 3, 2016 21:48
IActionFilter de ASP.Net MVC 5.2.3
// Assembly Microsoft.AspNet.Mvc.5.2.3
namespace System.Web.Mvc
{
/// <summary>
/// Defines the methods that are used in an action filter.
/// </summary>
public interface IActionFilter
{
/// <summary>
/// Called before an action method executes.
@jesulink2514
jesulink2514 / IAuditRequest.cs
Created January 3, 2016 22:27
IAuditRequest - Audit Sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace AuditSample.Models
{
public interface IAuditRequest
{
string UserId { get; set; }
@jesulink2514
jesulink2514 / Pizza.cs
Created January 3, 2016 22:32
Sample Class for audit sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace AuditSample.Models
{
public class Pizza: IAuditRequest
{
public int Id { get; set; }
@jesulink2514
jesulink2514 / AuditFilter.cs
Created January 3, 2016 22:44
AuditFilter - Paso 1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web;
using System.Web.Http.Controllers;
using System.Web.Mvc;
using Microsoft.AspNet.Identity;
namespace AuditSample.Models
@jesulink2514
jesulink2514 / AuditFilter.cs
Last active January 3, 2016 22:53
AuditFilter - Paso 2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web;
using System.Web.Http.Controllers;
using System.Web.Mvc;
using Microsoft.AspNet.Identity;
namespace AuditSample.Models