private static void CreateRepo() { using (var repo = new DatastoreRepository <MyItem>(repoID, SERVER, PORT)) { if (repo.RepositoryExists()) { repo.DeleteRepository(); } if (!repo.RepositoryExists()) { repo.CreateRepository(); } } }