Skip to content

Instantly share code, notes, and snippets.

View fredyfx's full-sized avatar
💭
With all the power 2.0!

Fredy R. Guibert フレディ fredyfx

💭
With all the power 2.0!
View GitHub Profile
@fredyfx
fredyfx / wasap.js
Created January 2, 2019 11:34
archivo final del tutorial
var app = new Vue({
el: "#primervue",
data: {
titulo: "Primeros pasos con VueJS y el buen @fredyfx"
}
});
var app2 = new Vue({
el: "#segundovue",
data: {
@fredyfx
fredyfx / index.cshtml
Created January 2, 2019 11:21
Parte final del tutorial
<html>
<head>
<script src="~/lib/vue/vue.js"></script>
<script src="~/lib/vue-resource/vue-resource.js"></script>
</head>
<body>
<p>
Index!
</p>
@fredyfx
fredyfx / startup.cs
Created January 1, 2019 21:30
Agregando el CORS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
@fredyfx
fredyfx / wasap.js
Created December 31, 2018 10:14
Archivo incial del VueJS
var app = new Vue({
el: "#primervue",
data: {
titulo: "Primeros pasos con VueJS y el buen @fredyfx"
}
});
var app2 = new Vue({
el: "#segundovue",
data: {
@fredyfx
fredyfx / index.cshtml
Created December 31, 2018 10:13
Creando la tabla con elementos que llegaron desde el Json
<html>
<head>
<script src="~/lib/vue/vue.js"></script>
<script src="~/lib/vue-resource/vue-resource.js"></script>
</head>
<body>
<p>
Index!
</p>
@fredyfx
fredyfx / gulpfile.js
Created December 30, 2018 22:53
Agregando vue-resource al archivo gulp
// Directorios de Dependencias
var dependencias = {
"vue": {
"dist/*": ""
},
"vue-resource": {
"dist/*": ""
}
};
@fredyfx
fredyfx / gulpfile.js
Created December 26, 2018 06:44
archivo de configuración de gulpfile.js
/// <binding Clean='clean, minify, scripts' />
/*
This file in the main entry point for defining Gulp tasks and using Gulp plugins.
Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007
*/
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var rimraf = require("rimraf");
@fredyfx
fredyfx / ProductController.cs
Created December 25, 2018 11:21
api del producto.
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AdvientoCSharpDic2018.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace AdvientoCSharpDic2018.Controllers
{
[Produces("application/json")]
@fredyfx
fredyfx / AdvientoContext.cs
Created December 25, 2018 00:51
Agregando las opciones a la base DbContext
using Microsoft.EntityFrameworkCore;
using AdvientoCSharpDic2018.Models;
namespace AdvientoCSharpDic2018
{
public class AdvientoContext : DbContext
{
public AdvientoContext(DbContextOptions<AdvientoContext> options) : base(options)
{
@fredyfx
fredyfx / startup.cs
Created December 25, 2018 00:39
Agregando la conexión a postgresql
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<AdvientoContext>(config=>{
config.UseNpgsql("Server=127.0.0.1; Port=5432; Database=Adviento2018; User Id=postgres; Password= root;");
});
services.AddMvc();
}