public async Task <IProjectFileInfoData> GetAsync(string projectId) { var partitionKey = ProjectFileInfoEntity.GeneratePartitionKey(); var rowKey = ProjectFileInfoEntity.GenerateRowKey(projectId); return(await _projectFileInfoTableStorage.GetDataAsync(partitionKey, rowKey)); }
public static ProjectFileInfoEntity Create(IFormFile file, string projectId) { var result = new ProjectFileInfoEntity { PartitionKey = GeneratePartitionKey(), RowKey = GenerateRowKey(projectId), FileName = file.FileName, ContentType = file.ContentType }; return(result); }
public static ProjectFileInfoEntity Create(IProjectFileInfoData src) { var result = new ProjectFileInfoEntity { PartitionKey = GeneratePartitionKey(), RowKey = GenerateRowKey(src.ProjectId), FileName = src.FileName, ContentType = src.ContentType }; return(result); }
public async Task SaveAsync(IProjectFileInfoData fileInfoData) { var newEntity = ProjectFileInfoEntity.Create(fileInfoData); await _projectFileInfoTableStorage.InsertOrReplaceAsync(newEntity); }