public IEnumerable <Employee> Search([NotNull] string searchRequest) { if (string.IsNullOrEmpty(searchRequest)) { return(storage.ReadAll()); } var keyWords = searchRequest.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); return(storage.ReadAll().Where(employee => IsSuccessSearch(employee, keyWords))); }
public void ExportToXml([NotNull] Stream fileStream) { exporterFactory.CreateXmlExporter <Employee[]>().Export(employeeStorage.ReadAll(), fileStream); }