public IEnumerable <Fall> GetAllFalls(Func <Fall, bool> pFunc = null) { try { if (pFunc == null) { return(dal.GetAllFalls()); } else { return((from fall in dal.GetAllFalls() where pFunc(fall) select fall).ToList()); } } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } }