/// <summary> /// Uses the ModelBuilder-class to configure the database aswell as /// doing database seeding, meaning data goes with the database from /// the "get-go" everytime it is created. /// /// Here I am calling ModelBuilder-extension-methods that I have made /// using a custom-made ModelBuilderExtensions-class. This is both to /// make the code cleaner in the OnModelCreating-method but also to /// split up the different configurations based on the specific Entity. /// </summary> /// <param name="modelBuilder"></param> protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.ActivityModelConfiguring(); // Activity modelBuilder.ActivityLogModelConfiguring(); // ActivityLog modelBuilder.CageModelConfiguring(); // Cage modelBuilder.ExerciseAreaModelConfiguring(); // ExerciseArea modelBuilder.HamsterModelConfiguring(); // Hamster modelBuilder.OwnerModelConfiguring(); // Owner modelBuilder.SimulationModelConfiguring(); // Simulation modelBuilder.DatabaseSeed(); // Database Seeding; adds the initial data }