public static string GetConnectionString(this Repository repository) { var dataPath = new DataPath(repository.Name); var dataFile = Path.Combine(dataPath.PhysicalPath, repository.Name + ".sdf"); var connectionString = string.Format("Data Source={0};Persist Security Info=False;", dataFile); if (!File.Exists(dataFile)) { DatabaseHelper.CreateDatabase(dataFile, connectionString); SchemaManager.InitializeDatabase(repository); } return connectionString; }
public static string GetCategoryDataFile(this Repository repository) { DataPath dataPath = new DataPath(repository.Name); return Path.Combine(dataPath.PhysicalPath, "_category_" + ".xml"); }
public static string GetContentFile(this Schema schema) { DataPath dataPath = new DataPath(schema.Repository.Name); return Path.Combine(dataPath.PhysicalPath, schema.Name + ".xml"); }