/// <summary> /// Initialize context /// </summary> /// <param name="context">NPVCalculatorDbContext object</param> public static void Initialize(NPVCalculatorDbContext context) { var initializer = new NPVCalculatorInitializer(); initializer.SeedEverything(context); context.Database.Migrate(); }
/// <summary> /// Method for seeding every table /// </summary> /// <param name="context">NPVCalculatorDbContext object</param> public void SeedEverything(NPVCalculatorDbContext context) { context.Database.EnsureCreated(); if (context.Projections.Any()) { return; // Db has been seeded } //SeedUsers(context); }