示例#1
0
        public static void InicializarUsuario(UsuarioContext context)
        {
            context.Database.EnsureCreated();

            if (context.Usuarios.Local.Count > 0)
            {
                return;
            }

            context.AddRange(
                new Usuario()
            {
                Nome = "Alan Barros", Username = "******", Senha = "1234"
            },
                new Usuario()
            {
                Nome = "João Paulo", Username = "******", Senha = "5678"
            }
                );
            context.SaveChanges();
        }