private static void SeedRoleWorker(IgnisContext context) { if (context.RoleWorker.Any()) { return; // DB has been seeded } context.RoleWorker.AddRange( new RoleWorker { Title = "Camarografo", Level = Level.Basico }, new RoleWorker { Title = "Grabacion", Level = Level.Avanzado }, new RoleWorker { Title = "Sonidista", Level = Level.Basico }, new RoleWorker { Title = "Fotografo", Level = Level.Avanzado } ); context.SaveChanges(); }
public static void Initialize(IServiceProvider serviceProvider) { using (var context = new IgnisContext( serviceProvider.GetRequiredService < DbContextOptions <IgnisContext> >())) { SeedRoleWorker(context); } }
public IndexModel(Ignis.Models.IgnisContext context) { _context = context; }
public DeleteModel(Ignis.Models.IgnisContext context) { _context = context; }
public EditModel(Ignis.Models.IgnisContext context) { _context = context; }
public DetailsModel(Ignis.Models.IgnisContext context) { _context = context; }
public CreateModel(Ignis.Models.IgnisContext context) { _context = context; }