Esempio n. 1
0
        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)));
        }
Esempio n. 2
0
 public void ExportToXml([NotNull] Stream fileStream)
 {
     exporterFactory.CreateXmlExporter <Employee[]>().Export(employeeStorage.ReadAll(), fileStream);
 }