public List <Conference> CheckVisibleConf(List <Conference> list) { if (list.Count() > 0) { foreach (var item in list) { if (item.Date < DateTime.Now && item.Visibility == true) { item.Visibility = false; _conferRepository.Update(item); } } return(_conferRepository.GetAll()); } return(null); }