public static void Initialize(IServiceProvider serviceProvider) { using (var context = new SmartAspContext( serviceProvider.GetRequiredService < DbContextOptions <SmartAspContext> >())) { // Look for any movies. if (context.Product.Any()) { return; // DB has been seeded } } }
public BrandsController(SmartAspContext context) { _context = context; }
public ProductsController(SmartAspContext context) { _context = context; }
public DepartmentsController(SmartAspContext context) { _context = context; }