public List <DirectoryEntry> Directory() { var databaseEntries = DirectoryData.GetAllEntries(); return(databaseEntries.Select(dbDirectoryEntry => new DirectoryEntry { Pkid = dbDirectoryEntry.Pkid, Name = dbDirectoryEntry.Name, TelephoneNumber = dbDirectoryEntry.TelephoneNumber }).ToList()); }