public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseCors(option =>
            {
                option.AllowAnyOrigin();
                option.AllowAnyHeader();
                option.AllowAnyMethod();
            });
            app.UseSwagger();
            app.UseSwaggerUI(options =>
            {
                options.SwaggerEndpoint("/swagger/v1/swagger.json", "Movie Rental API v1");
            });

            app.UseRouting();
            app.UseAuthorization();
            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            var movieRepository    = app.ApplicationServices.GetService <IMovieRepository>();
            var memberRepository   = app.ApplicationServices.GetService <IMemberRepository>();
            var purchaseRepository = app.ApplicationServices.GetService <IPurchaseRepository>();

            // This piece of code seeds fake data to the database
            DataSeeder.CreateMovies(movieRepository);
            DataSeeder.CreateMembers(memberRepository);
            DataSeeder.CreatePurchases(movieRepository, memberRepository, purchaseRepository);
        }