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
gist ws | |
// En ValuesService.cs | |
public static readonly string NewsApiUrl = "http://mirepogavilanch2.azurewebsites.net/api/NotiXamarin/"; | |
// En HttpResponse | |
public class HttpResponse | |
{ |
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
// AssemblyInfo.cs | |
#if DEBUG | |
[assembly: Application(Debuggable=true)] | |
#else | |
[assembly: Application(Debuggable=false)] | |
#endif |
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
// tambien deberas traer los siguientes namespaces: | |
using System; | |
using System.Linq; | |
public class LeastParametersConstructorBehavior : IConstructorResolutionBehavior | |
{ | |
public ConstructorInfo GetConstructor(Type implementationType) => ( | |
from ctor in implementationType.GetConstructors() | |
orderby ctor.GetParameters().Length ascending |
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
container.Options.ConstructorResolutionBehavior = new LeastParametersConstructorBehavior(); |
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
[assembly: WebActivator.PostApplicationStartMethod(typeof(web2.App_Start.SimpleInjectorInitializer), "Initialize")] | |
namespace web2.App_Start | |
{ | |
using System.Reflection; | |
using System.Web.Mvc; | |
using SimpleInjector; | |
using SimpleInjector.Integration.Web; | |
using SimpleInjector.Integration.Web.Mvc; |
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
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using IdentityDemo.Models; | |
using Microsoft.AspNetCore.Identity; | |
using Microsoft.AspNetCore.Authorization; | |
namespace IdentityDemo.Controllers | |
{ |
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
using (var context = new ApplicationDbContext()) | |
{ | |
var fechas = context.Estudiantes.Where(x => x.FechaNacimiento <= DateTime.Now.AddYears(-18)).Select(x => x.FechaNacimiento).ToList(); | |
} |
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
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
{ | |
optionsBuilder.UseSqlServer("Data Source=(localdb)\\mssqllocaldb;Initial Catalog=EFCore_Mod3_Udemy;Integrated Security=True") | |
.EnableSensitiveDataLogging(true) | |
.UseLoggerFactory(new LoggerFactory().AddConsole((category, level) => level == LogLevel.Information && category == DbLoggerCategory.Database.Command.Name, true)); | |
} |
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 [master] | |
GO | |
/****** Object: Database [ValuesDB] Script Date: 05-May-19 7:19:30 PM ******/ | |
CREATE DATABASE [ValuesDB] | |
CONTAINMENT = NONE | |
ON PRIMARY | |
( NAME = N'ValuesDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\ValuesDB.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ) | |
LOG ON | |
( NAME = N'ValuesDB_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\ValuesDB_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB ) | |
GO |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>AngularTodo</title> | |
<base href="/"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="favicon.ico"> | |
</head> |