Ejemplo n.º 1
0
        public async Task <IProjectFileInfoData> GetAsync(string projectId)
        {
            var partitionKey = ProjectFileInfoEntity.GeneratePartitionKey();
            var rowKey       = ProjectFileInfoEntity.GenerateRowKey(projectId);

            return(await _projectFileInfoTableStorage.GetDataAsync(partitionKey, rowKey));
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public static ProjectFileInfoEntity Create(IProjectFileInfoData src)
        {
            var result = new ProjectFileInfoEntity
            {
                PartitionKey = GeneratePartitionKey(),
                RowKey       = GenerateRowKey(src.ProjectId),
                FileName     = src.FileName,
                ContentType  = src.ContentType
            };

            return(result);
        }
Ejemplo n.º 4
0
 public async Task SaveAsync(IProjectFileInfoData fileInfoData)
 {
     var newEntity = ProjectFileInfoEntity.Create(fileInfoData);
     await _projectFileInfoTableStorage.InsertOrReplaceAsync(newEntity);
 }