示例#1
0
        public static void SeedNormalUsers(PixelArtWarsDbContext db)
        {
            for (int i = 0; i < 20; i++)
            {
                db.Users.Add(new User()
                {
                    UserName = i.ToString(),
                    Email    = $"bistra{i}@basheva.tues",
                    IsBanned = false
                });
            }

            db.SaveChanges();
        }
示例#2
0
        public static void SeedGames(PixelArtWarsDbContext db)
        {
            for (int i = 0; i < 20; i++)
            {
                db.Games.Add(new Game()
                {
                    Theme        = $"StellaBasheva{i}",
                    Status       = GameStauts.Active,
                    PlayersCount = 2
                });
            }

            db.SaveChanges();
        }