public async Task <string> Index() { List <FileInfo> files = await _context.GetAllFiles(); var fileList = files.ToList(); var elasticFileInfo = fileList.ConvertAll(f => new ElasticFileInfo { Id = f.Id, ParentId = f.ParentId, Name = f.Name, Type = f.Type, Description = f.Description, CreatedBy = f.CreatedBy, CreatedOn = f.CreatedOn, LastModified = f.LastModified, TypeAsString = ResolveType(f.Type), Location = ResolveLocation(f.Location) }); return($"{_searchEngineService.Index(elasticFileInfo)} files indexed"); }
public async void GetAllFilesByStoredProcedureTest() { var allFiles = await dbContext.GetAllFiles(); Assert.Equal(61, allFiles.Count); }