コード例 #1
0
        public async Task <Guid> CreateDocumentRecordAsync(DocumentRecordEntity documentRecord)
        {
            _context.DocumentRecord.Add(documentRecord);
            await _context.SaveChangesAsync();

            return(documentRecord.DocumentRecordId);
        }
コード例 #2
0
        public async Task <Document> AddDocumentRecord(string fileName, Guid location, long fileSize)
        {
            var documentRecordEntity = new DocumentRecordEntity {
                DocumentId = location, FileName = fileName, FileSize = fileSize
            };
            var recordGuid = await _dbRepository.CreateDocumentRecordAsync(documentRecordEntity);

            return(new Document {
                FileName = fileName, FileSize = fileSize, Location = location, Id = recordGuid
            });
        }