コード例 #1
0
        public MainWindow()
        {
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            InitializeComponent();
            CRUD_UserMethods userMethods = new CRUD_UserMethods();

            userMethods.selectedReset();
        }
コード例 #2
0
        public void Setup()
        {
            _crudMethods = new CRUD_UserMethods();
            // remove test entry in DB if present
            using (var db = new GameMarketContext())
            {
                var selectedUsers =
                    from c in db.Users
                    where c.Username == "Beausy"
                    select c;

                var selectedUsers2 =
                    from c in db.Users
                    where c.Username == "Beausy2"
                    select c;

                db.Users.RemoveRange(selectedUsers);
                db.Users.RemoveRange(selectedUsers2);
                db.SaveChanges();
            }
        }