/// <summary> /// Remove Table Entity. Throws exception on failure. /// </summary> private static async Task RemoveTableEntity(string tableName, string databaseName, StorageAdapterBase adapter) { await adapter.WriteAsync($"{databaseName}/{tableName}.cdm.json", null); }
/// <summary> /// Remove Relationship Entity. Throws exception on failure. /// </summary> private static async Task RemoveRelationshipEntity(string relationship, string databaseName, StorageAdapterBase adapter) { await adapter.WriteAsync($"{databaseName}/{databaseName}.manifest.cdm.json/relationships/{relationship}", null); }
/// <summary> /// Create or update Syms RelationshipEntity. Throws exception on failure. /// </summary> private static async Task CreateOrUpdateRelationshipEntity(RelationshipEntity relationshipEntity, string databaseName, StorageAdapterBase adapter) { await adapter.WriteAsync($"{databaseName}/{databaseName}.manifest.cdm.json/relationships/{relationshipEntity.Name}", JsonConvertSerializeObject(relationshipEntity)); }
/// <summary> /// Create or update Syms Table Entity. Throws exception on failure. /// </summary> private static async Task CreateOrUpdateTableEntity(TableEntity tableEntity, string databaseName, StorageAdapterBase adapter) { await adapter.WriteAsync($"{databaseName}/{tableEntity.Name}.cdm.json", JsonConvertSerializeObject(tableEntity)); }
/// <summary> /// Create or update Syms RelationshipEntity. Throws exception on failure. /// </summary> internal static async Task CreateOrUpdateRelationshipEntity(RelationshipEntity relationshipEntity, StorageAdapterBase adapter) { string databaseName = ((RelationshipProperties)relationshipEntity.Properties).NamespaceProperty.DatabaseName; await adapter.WriteAsync($"{databaseName}/{databaseName}.manifest.cdm.json/relationships/{relationshipEntity.Name}", JsonConvertSerializeObject(relationshipEntity)); }
/// <summary> /// Create or update Syms Table Entity. Throws exception on failure. /// </summary> internal static async Task CreateOrUpdateTableEntity(TableEntity tableEntity, StorageAdapterBase adapter) { await adapter.WriteAsync($"{((TableProperties)tableEntity.Properties).NamespaceProperty.DatabaseName}/{tableEntity.Name}.cdm.json", JsonConvertSerializeObject(tableEntity)); }
/// <summary> /// Create or update Database. Throws exception on failure. /// </summary> internal static async Task CreateOrUpdateDatabase(DatabaseEntity databaseEntity, StorageAdapterBase adapter) { await adapter.WriteAsync($"{databaseEntity.Name}/{databaseEntity.Name}.manifest.cdm.json", JsonConvertSerializeObject(databaseEntity)); }