public List <MovieDTO> GetMovieByDay(DateTime date) { try { MovieDAO movieDAO = new MovieDAO(); return(movieDAO.GetMovieByDay(date)); } catch (Exception ex) { throw ex; } }
static void Main(string[] args) { MovieDAO dao = new MovieDAO(); DateTime date = DateTime.Now.AddDays(-1); List <MovieDTO> movies = dao.GetMovieByDay(date); foreach (MovieDTO mv in movies) { Console.WriteLine($"{mv.MovieName}"); } Console.ReadLine(); }