예제 #1
0
        private void UpdateDbContext()
        {
            IList <Google.Apis.Drive.v3.Data.File> googleFiles = fileStore.Files;
            List <FileDto> modelFilesDto = new List <FileDto>();

            foreach (var file in googleFiles)
            {
                modelFilesDto.Add(new FileDto {
                    SourceId = file.Id,
                    Name     = file.Name
                });
            }

            fileService.AddOrUpdateFiles(modelFilesDto);
        }