Esempio n. 1
0
        public void InitializeDatabase()
        {
            var isCreated = (context.GetService <IDatabaseCreator>() as RelationalDatabaseCreator).Exists();

            if (!isCreated)
            {
                this.context.Database.Migrate();

                InsertUsers();
                InsertProducts();
                InsertCategories();
                InsertProductCategories();
            }
        }