Exemple #1
0
 /// <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);
 }
Exemple #2
0
 /// <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);
 }
Exemple #3
0
 /// <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));
 }
Exemple #4
0
 /// <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));
 }
Exemple #5
0
 /// <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));
 }
Exemple #6
0
 /// <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));
 }
Exemple #7
0
 /// <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));
 }