コード例 #1
0
ファイル: ProfileTEST.cs プロジェクト: JakeEllis/CIS411
        public void cleanup()
        {
            IQueryable <Bridge_Combo_ID> bridgeIDs = bridgerepo.query(a => a.Bridge_Combo_ID1 == 123432);

            foreach (Bridge_Combo_ID item in bridgeIDs.ToList <Bridge_Combo_ID>())
            {
                bridgerepo.remove(item);
            }

            IQueryable <Song> songs = songrepo.query(a => a.Song_ID == 11111);

            foreach (Song item in songs.ToList <Song>())
            {
                songrepo.remove(item);
            }

            IQueryable <Playlist> playlists = playlistrepo.query(a => a.Playlist_ID == 4);

            foreach (Playlist item in playlists.ToList <Playlist>())
            {
                playlistrepo.remove(item);
            }

            IQueryable <Party> partys = partyrepo.query(a => a.Party_ID == 4);

            foreach (Party item in partys.ToList <Party>())
            {
                partyrepo.remove(item);
            }

            IQueryable <Role_Permission> rolePermissions = role_permissionrepo.query(a => a.Role_Permission_Combo_ID == 4);

            foreach (Role_Permission item in rolePermissions.ToList <Role_Permission>())
            {
                role_permissionrepo.remove(item);
            }

            IQueryable <Person_Role> rolesPermissions = personrolerepo.query(a => a.Person_Role_ID == 4);

            foreach (Person_Role item in rolesPermissions.ToList <Person_Role>())
            {
                personrolerepo.remove(item);
            }

            IQueryable <Person> persons = personrepo.query(a => a.Person_ID == 4);

            foreach (Person item in persons.ToList <Person>())
            {
                personrepo.remove(item);
            }

            IQueryable <Profile> profiles = profilerepo.query(a => a.Profile_ID == 4);

            foreach (Profile item in profiles.ToList <Profile>())
            {
                profilerepo.remove(item);
            }
        }
コード例 #2
0
ファイル: SongTEST.cs プロジェクト: JakeEllis/CIS411
        public void clear()
        {
            IQueryable <Song> songs = songRepo.query(a => a.Song_ID == 1);

            foreach (Song item in songs.ToList <Song>())
            {
                songRepo.remove(item);
            }
        }