Beispiel #1
0
        protected override void Seed(Main_Object.App_Context context)
        {
            AdminUser user = new AdminUser();

            user.Register("admin", "admin", "*****@*****.**");

            //  This method will be called after migrating to the latest version.
            context.Database.ExecuteSqlCommand("UPDATE [dbo].[Users] SET AccessId=5 WHERE Username='******'");
            //  You can use the DbSet<T>.AddOrUpdate() helper extension method
            //  to avoid creating duplicate seed data.
        }