public static void Initializt(AspNetCoreContext context) { context.Database.EnsureCreated(); if (context.Categoria.Any()) { return; } var categorias = new Categoria[] { new Categoria { categoriaName = "Programacion", catgoriaDescription = "Programacion", categoriaStatus = true }, new Categoria { categoriaName = "Diseño Grafico", catgoriaDescription = "Diseño Grafico", categoriaStatus = true } }; foreach (Categoria item in categorias) { context.Add(item); } context.SaveChanges(); }
public EditModel(AspNetCore.Data.AspNetCoreContext context) { _context = context; }
public IndexModel(AspNetCore.Data.AspNetCoreContext context) { _context = context; }
public DetailsModel(AspNetCore.Data.AspNetCoreContext context) { _context = context; }
public DeleteModel(AspNetCore.Data.AspNetCoreContext context) { _context = context; }