public List <Time> ReadByDate(DateTime time) { List <Time> list = new List <Time>(); using (DbContext context = new DbContext()) { _repository = new TimeRepository(context); list = _repository.ReadByDate(time); } return(list); }