private async Task <List <Type> > GetMissingCollectionTypesAsync(IMongoDatabase db) { HashSet <string> existing = (await db.ListCollectionNames().ToListAsync()) .Where(n => n.StartsWith(Collection.FfdbPrefix)) .ToHashSet(); return(CollectionResolver.GetDocumentTypes() .Where(t => !existing.Contains( CollectionResolver.GetName(t))) .ToList()); }