コード例 #1
0
        public static void Main(string[] args)
        {
            var context = new VideoRentalDbContext();

            // Action movies sorted by name
            Console.WriteLine();
            Console.WriteLine("ACTION MOVIES SORTED BY NAME");

            /* var actionMovies = context.Videos
             *   .Where(v => v.Genre.Name == "Action")
             *   .OrderBy(v => v.Name);
             *
             * foreach (var video in actionMovies)
             * {
             *   Console.WriteLine(video.Name);
             * }
             */
        }
コード例 #2
0
        public MoviesController(VideoRentalDbContext context)

        {
            _context = context;
        }
コード例 #3
0
 public CustomersController()
 {
     db = new VideoRentalDbContext();
 }
コード例 #4
0
        public CustomersController(VideoRentalDbContext context)

        {
            _context = context;
        }
コード例 #5
0
 public NewRentalsController()
 {
     db = new VideoRentalDbContext();
 }