diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100755
index 00000000..77f1912f
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,19 @@
+init:
+- git config --global core.autocrlf true
+install:
+- ps: Install-Product node 6.9.2 x64
+branches:
+ only:
+ - master
+ - /^release\/.*$/
+ - /^(.*\/)?ci-.*$/
+build_script:
+- ps: .\run.ps1 default-build
+clone_depth: 1
+environment:
+ global:
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+ DOTNET_CLI_TELEMETRY_OPTOUT: 1
+test: 'off'
+deploy: 'off'
+os: Visual Studio 2017
diff --git a/.gitignore b/.gitignore
index 9f1553ef..79812ddb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,6 @@ PublishProfiles/
*.docstates
_ReSharper.*
nuget.exe
-project.lock.json
*net45.csproj
*net451.csproj
*k10.csproj
@@ -25,16 +24,8 @@ project.lock.json
*.ncrunchsolution
*.*sdf
*.ipch
-
.vs/
npm-debug.log
/.build/
-
-# The templates can't contain their own .gitignore files, because Yeoman has strange default handling for
-# files with that name (https://github.com/npm/npm/issues/1862). So, each template instead has a template_gitignore
-# file which gets renamed after the files are copied. And so any files that need to be excluded in the source
-# repo have to be excluded here.
-/templates/*/node_modules/
-/templates/*/wwwroot/dist/
-/templates/*/ClientApp/dist/
.vscode/
+global.json
diff --git a/.travis.yml b/.travis.yml
index d2d8dfdd..d974c566 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,11 +10,15 @@ addons:
- libssl-dev
- libunwind8
- zlib1g
-mono:
- - 4.0.5
+mono: none
os:
- - linux
- - osx
+- linux
+- osx
osx_image: xcode7.1
script:
- - ./build.sh verify
+- ./build.sh
+branches:
+ only:
+ - master
+ - /^release\/.*$/
+ - /^(.*\/)?ci-.*$/
diff --git a/.vsts-pipelines/builds/ci-internal.yml b/.vsts-pipelines/builds/ci-internal.yml
new file mode 100644
index 00000000..c2c5336f
--- /dev/null
+++ b/.vsts-pipelines/builds/ci-internal.yml
@@ -0,0 +1,13 @@
+trigger:
+- master
+- release/*
+
+resources:
+ repositories:
+ - repository: buildtools
+ type: git
+ name: aspnet-BuildTools
+ ref: refs/heads/master
+
+phases:
+- template: .vsts-pipelines/templates/project-ci.yml@buildtools
diff --git a/.vsts-pipelines/builds/ci-public.yml b/.vsts-pipelines/builds/ci-public.yml
new file mode 100644
index 00000000..507c89b0
--- /dev/null
+++ b/.vsts-pipelines/builds/ci-public.yml
@@ -0,0 +1,15 @@
+trigger:
+- master
+- release/*
+
+# See https://github.com/aspnet/BuildTools
+resources:
+ repositories:
+ - repository: buildtools
+ type: github
+ endpoint: DotNet-Bot GitHub Connection
+ name: aspnet/BuildTools
+ ref: refs/heads/master
+
+phases:
+- template: .vsts-pipelines/templates/project-ci.yml@buildtools
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 64ff041d..eac4268e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,4 +1,4 @@
Contributing
======
-Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo.
+Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/master/CONTRIBUTING.md) in the Home repo.
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..cec8e3da
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ Microsoft ASP.NET Core
+ https://github.com/aspnet/javascriptservices
+ git
+ $(MSBuildThisFileDirectory)
+ $(MSBuildThisFileDirectory)build\Key.snk
+ true
+ true
+
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
new file mode 100644
index 00000000..7e3f8df9
--- /dev/null
+++ b/Directory.Build.targets
@@ -0,0 +1,6 @@
+
+
+ $(MicrosoftNETCoreAppPackageVersion)
+ $(NETStandardLibrary20PackageVersion)
+
+
diff --git a/JavaScriptServices.sln b/JavaScriptServices.sln
index 55338882..f01aa1a9 100644
--- a/JavaScriptServices.sln
+++ b/JavaScriptServices.sln
@@ -1,50 +1,43 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25123.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{E6E88944-4800-40BA-8AF5-069EA3ADFEB8}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.NodeServices", "src\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.xproj", "{B0FA4175-8B29-4904-9780-28B3C24B0567}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "NodeServicesExamples", "samples\misc\NodeServicesExamples\NodeServicesExamples.xproj", "{6D4BCDD6-7951-449B-BE55-CB7F014B7430}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{78DAC76C-1092-45AB-BF0D-594B8C7B6569}"
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.16
+MinimumVisualStudioVersion = 15.0.26730.03
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{27304DDE-AFB2-4F8B-B765-E3E2F11E886C}"
ProjectSection(SolutionItems) = preProject
- global.json = global.json
+ src\Directory.Build.props = src\Directory.Build.props
EndProjectSection
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MusicStore", "samples\angular\MusicStore\MusicStore.xproj", "{1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactGrid", "samples\react\ReactGrid\ReactGrid.xproj", "{ABF90A5B-F4E0-438C-A6E4-9549FB43690B}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.AngularServices", "src\Microsoft.AspNetCore.AngularServices\Microsoft.AspNetCore.AngularServices.xproj", "{421807E6-B62C-417B-B901-46C5DEDAA8F1}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.ReactServices", "src\Microsoft.AspNetCore.ReactServices\Microsoft.AspNetCore.ReactServices.xproj", "{B04381DE-991F-4831-A0B5-FE1BD3EF80C4}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.SpaServices", "src\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.xproj", "{4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.NodeServices", "src\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.csproj", "{66B77203-1469-41DF-92F2-2BE6900BD36F}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{727E6D58-6830-4792-96C6-E138A33959FB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.NodeServices.Sockets", "src\Microsoft.AspNetCore.NodeServices.Sockets\Microsoft.AspNetCore.NodeServices.Sockets.csproj", "{F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Angular2Spa", "templates\Angular2Spa\Angular2Spa.xproj", "{8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices", "src\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.csproj", "{66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactReduxSpa", "templates\ReactReduxSpa\ReactReduxSpa.xproj", "{DBFC6DB0-A6D1-4694-A108-1C604B988DA3}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactSpa", "templates\ReactSpa\ReactSpa.xproj", "{E9D1A695-F0E6-46F2-B5E3-72F4AF805387}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{99EAF1FE-22C8-4526-BE78-74B24125D37F}"
+ ProjectSection(SolutionItems) = preProject
+ .gitignore = .gitignore
+ global.json = global.json
+ README.md = README.md
+ EndProjectSection
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApplicationBasic", "templates\WebApplicationBasic\WebApplicationBasic.xproj", "{CB4398D6-B7F1-449A-AE02-828769679232}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{23836492-E7F4-4376-85BF-A635C304AC46}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{E0771531-BE20-40CD-A1B0-A57E09511060}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{E6A161EA-646C-4033-9090-95BE809AB8D9}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Webpack", "samples\misc\Webpack\Webpack.xproj", "{A8905301-8492-42FD-9E83-F715A0FDC3A2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LatencyTest", "samples\misc\LatencyTest\LatencyTest.csproj", "{1931B19A-EC42-4D56-B2D0-FB06D17244DA}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LatencyTest", "samples\misc\LatencyTest\LatencyTest.xproj", "{A64AF9D9-72AA-4433-BE1D-DC2524B6808A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Webpack", "samples\misc\Webpack\Webpack.csproj", "{DE479DC3-1461-4EAD-A188-4AF7AA4AE344}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "React", "React", "{E0EBA813-4478-4C02-B11D-FB3793113FE4}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NodeServicesExamples", "samples\misc\NodeServicesExamples\NodeServicesExamples.csproj", "{93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MusicStore", "samples\react\MusicStore\MusicStore.xproj", "{C870A92C-9E3F-4BF2-82B8-5758545A8B7C}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{645F7363-1240-4FB6-9422-B32A327C979F}"
+ ProjectSection(SolutionItems) = preProject
+ Directory.Build.props = Directory.Build.props
+ Directory.Build.targets = Directory.Build.targets
+ EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Angular", "Angular", "{4867A616-83D6-48DC-964D-6AE743596631}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices.Extensions", "src\Microsoft.AspNetCore.SpaServices.Extensions\Microsoft.AspNetCore.SpaServices.Extensions.csproj", "{D40BD1C4-6A6F-4213-8535-1057F3EB3400}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -52,79 +45,49 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B0FA4175-8B29-4904-9780-28B3C24B0567}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B0FA4175-8B29-4904-9780-28B3C24B0567}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B0FA4175-8B29-4904-9780-28B3C24B0567}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B0FA4175-8B29-4904-9780-28B3C24B0567}.Release|Any CPU.Build.0 = Release|Any CPU
- {6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Release|Any CPU.Build.0 = Release|Any CPU
- {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Release|Any CPU.Build.0 = Release|Any CPU
- {ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Release|Any CPU.Build.0 = Release|Any CPU
- {421807E6-B62C-417B-B901-46C5DEDAA8F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {421807E6-B62C-417B-B901-46C5DEDAA8F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {421807E6-B62C-417B-B901-46C5DEDAA8F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {421807E6-B62C-417B-B901-46C5DEDAA8F1}.Release|Any CPU.Build.0 = Release|Any CPU
- {B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Release|Any CPU.Build.0 = Release|Any CPU
- {4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Release|Any CPU.Build.0 = Release|Any CPU
- {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Release|Any CPU.Build.0 = Release|Any CPU
- {DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Release|Any CPU.Build.0 = Release|Any CPU
- {E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Release|Any CPU.Build.0 = Release|Any CPU
- {CB4398D6-B7F1-449A-AE02-828769679232}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CB4398D6-B7F1-449A-AE02-828769679232}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CB4398D6-B7F1-449A-AE02-828769679232}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CB4398D6-B7F1-449A-AE02-828769679232}.Release|Any CPU.Build.0 = Release|Any CPU
- {A8905301-8492-42FD-9E83-F715A0FDC3A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A8905301-8492-42FD-9E83-F715A0FDC3A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A8905301-8492-42FD-9E83-F715A0FDC3A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A8905301-8492-42FD-9E83-F715A0FDC3A2}.Release|Any CPU.Build.0 = Release|Any CPU
- {A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Release|Any CPU.Build.0 = Release|Any CPU
- {C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {66B77203-1469-41DF-92F2-2BE6900BD36F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {66B77203-1469-41DF-92F2-2BE6900BD36F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {66B77203-1469-41DF-92F2-2BE6900BD36F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {66B77203-1469-41DF-92F2-2BE6900BD36F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Release|Any CPU.Build.0 = Release|Any CPU
+ {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D40BD1C4-6A6F-4213-8535-1057F3EB3400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D40BD1C4-6A6F-4213-8535-1057F3EB3400}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D40BD1C4-6A6F-4213-8535-1057F3EB3400}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D40BD1C4-6A6F-4213-8535-1057F3EB3400}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {6D4BCDD6-7951-449B-BE55-CB7F014B7430} = {E0771531-BE20-40CD-A1B0-A57E09511060}
- {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B} = {4867A616-83D6-48DC-964D-6AE743596631}
- {ABF90A5B-F4E0-438C-A6E4-9549FB43690B} = {E0EBA813-4478-4C02-B11D-FB3793113FE4}
- {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11} = {727E6D58-6830-4792-96C6-E138A33959FB}
- {DBFC6DB0-A6D1-4694-A108-1C604B988DA3} = {727E6D58-6830-4792-96C6-E138A33959FB}
- {E9D1A695-F0E6-46F2-B5E3-72F4AF805387} = {727E6D58-6830-4792-96C6-E138A33959FB}
- {CB4398D6-B7F1-449A-AE02-828769679232} = {727E6D58-6830-4792-96C6-E138A33959FB}
- {E0771531-BE20-40CD-A1B0-A57E09511060} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8}
- {A8905301-8492-42FD-9E83-F715A0FDC3A2} = {E0771531-BE20-40CD-A1B0-A57E09511060}
- {A64AF9D9-72AA-4433-BE1D-DC2524B6808A} = {E0771531-BE20-40CD-A1B0-A57E09511060}
- {E0EBA813-4478-4C02-B11D-FB3793113FE4} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8}
- {C870A92C-9E3F-4BF2-82B8-5758545A8B7C} = {E0EBA813-4478-4C02-B11D-FB3793113FE4}
- {4867A616-83D6-48DC-964D-6AE743596631} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8}
+ {66B77203-1469-41DF-92F2-2BE6900BD36F} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
+ {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
+ {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
+ {E6A161EA-646C-4033-9090-95BE809AB8D9} = {23836492-E7F4-4376-85BF-A635C304AC46}
+ {1931B19A-EC42-4D56-B2D0-FB06D17244DA} = {E6A161EA-646C-4033-9090-95BE809AB8D9}
+ {DE479DC3-1461-4EAD-A188-4AF7AA4AE344} = {E6A161EA-646C-4033-9090-95BE809AB8D9}
+ {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE} = {E6A161EA-646C-4033-9090-95BE809AB8D9}
+ {D40BD1C4-6A6F-4213-8535-1057F3EB3400} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {DDF59B0D-2DEC-45D6-8667-DCB767487101}
EndGlobalSection
EndGlobal
diff --git a/LICENSE.txt b/LICENSE.txt
index 0bdc1962..b3b180cd 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,12 +1,201 @@
-Copyright (c) .NET Foundation. All rights reserved.
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-these files except in compliance with the License. You may obtain a copy of the
-License at
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-http://www.apache.org/licenses/LICENSE-2.0
+ 1. Definitions.
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright (c) .NET Foundation and Contributors
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/NuGet.config b/NuGet.config
new file mode 100644
index 00000000..e32bddfd
--- /dev/null
+++ b/NuGet.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/NuGet.master.config b/NuGet.master.config
deleted file mode 100755
index 1ff3c9aa..00000000
--- a/NuGet.master.config
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/NuGetPackageVerifier.json b/NuGetPackageVerifier.json
new file mode 100644
index 00000000..22ef3c09
--- /dev/null
+++ b/NuGetPackageVerifier.json
@@ -0,0 +1,7 @@
+{
+ "Default": {
+ "rules": [
+ "DefaultCompositeRule"
+ ]
+ }
+}
diff --git a/README.md b/README.md
index 752a18ac..dfa67285 100644
--- a/README.md
+++ b/README.md
@@ -1,45 +1,61 @@
-# JavaScriptServices
+# JavaScriptServices [Archived]
+
+## IMPORTANT
+
+The features described in this article are obsolete as of ASP.NET Core 3.0. A simpler SPA frameworks integration mechanism is available in the [Microsoft.AspNetCore.SpaServices.Extensions](https://www.nuget.org/packages/Microsoft.AspNetCore.SpaServices.Extensions) NuGet package. For more information, see [[Announcement] Obsoleting Microsoft.AspNetCore.SpaServices and Microsoft.AspNetCore.NodeServices](https://github.com/dotnet/AspNetCore/issues/12890).
-This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo.
## What is this?
-`JavaScriptServices` is a set of technologies for ASP.NET Core developers. It provides infrastructure that you'll find useful if you use Angular 2 / React / Knockout / etc. on the client, or if you build your client-side resources using Webpack, or otherwise want to execute JavaScript on the server at runtime.
+`JavaScriptServices` is a set of client-side technologies for ASP.NET Core. It provides infrastructure that you'll find useful if you:
+
+- Use Angular / React / Vue / Aurelia / Knockout / etc.
+- Build your client-side resources using Webpack.
+- Execute JavaScript on the server at runtime.
+
+Read [Building Single Page Applications on ASP.NET Core with JavaScriptServices](https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/) for more details.
This repo contains:
* A set of NuGet/NPM packages that implement functionality for:
- * Invoking arbitrary NPM packages at runtime from .NET code ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.NodeServices#simple-usage-example))
- * Server-side prerendering of SPA components ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#server-side-prerendering))
- * Webpack dev middleware ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#webpack-dev-middleware))
- * Hot module replacement (HMR) ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#webpack-hot-module-replacement))
- * Server-side and client-side routing integration ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#routing-helper-mapspafallbackroute))
+ * Invoking arbitrary NPM packages at runtime from .NET code ([docs](/src/Microsoft.AspNetCore.NodeServices#simple-usage-example))
+ * Server-side prerendering of SPA components ([docs](/src/Microsoft.AspNetCore.SpaServices#server-side-prerendering))
+ * Webpack dev middleware ([docs](/src/Microsoft.AspNetCore.SpaServices#webpack-dev-middleware))
+ * Hot module replacement (HMR) ([docs](/src/Microsoft.AspNetCore.SpaServices#webpack-hot-module-replacement))
+ * Server-side and client-side routing integration ([docs](/src/Microsoft.AspNetCore.SpaServices#routing-helper-mapspafallbackroute))
* Server-side and client-side validation integration
- * "Cache priming" for Angular 2 apps
* "Lazy loading" for Knockout apps
- * A Yeoman generator that creates preconfigured app starting points ([guide](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/))
* Samples and docs
-Everything here is cross-platform, and works with .NET Core 1.0.1 or later on Windows, Linux, or OS X.
+It's cross-platform (Windows, Linux, or macOS) and works with .NET Core 2.0 or later.
## Creating new applications
-If you want to build a brand-new ASP.NET Core app that uses Angular 2 / React / Knockout on the client, consider starting with the `aspnetcore-spa` generator. This lets you choose your client-side framework, and generates a starting point that includes applicable features such as Webpack dev middleware, server-side prerendering, and efficient production builds. It's much easier than configuring everything to work together manually!
+Prerequisites:
+
+* [.NET Core 2.0](https://www.microsoft.com/net/core) (or later) SDK
+* [Node.js](https://nodejs.org/) version 6 (or later)
+
+With these prerequisites, you can immediately create new ASP.NET Core applications that use Angular, React, or React+Redux without having to install anything extra.
-To do this, first install Yeoman and these generator templates:
+### Option 1: Creating Angular/React/Redux applications from the command line (cross-platform)
- npm install -g yo generator-aspnetcore-spa
+In an empty directory, run (for example) `dotnet new angular`. Other supported SPA frameworks include React and React+Redux. You can see the list of available SPA templates by running `dotnet new spa`.
-Then you can generate your new application starting point:
+Once the generator has run and restored all the dependencies, you can start up your new ASP.NET Core SPA:
- cd some-empty-directory
- yo aspnetcore-spa
+ npm install
+ dotnet run
-Finally, once the generator has run and restored all the dependencies, you can start up your new ASP.NET Core Single Page Application:
+### Option 2: Creating Angular/React/Redux applications using Visual Studio 2017 Update 3 or later (Windows only)
- dotnet run
+Using the `File`->`New Project` dialog, select *ASP.NET Core Web Application*. You will then be offered the option to create an application with Angular, React, or React+Redux. When the application is created, you can build and run it in the normal way.
-For a more detailed walkthrough, see [getting started with the `aspnetcore-spa` generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/).
+### More info and other SPA frameworks
+
+For a more detailed (albeit somewhat outdated) walkthrough, see [getting started with the `aspnetcore-spa` generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/).
+
+If you want to build an ASP.NET Core application with Aurelia, Knockout, or Vue, you can use the `Microsoft.AspNetCore.SpaTemplates` package. On the command line, run `dotnet new --install Microsoft.AspNetCore.SpaTemplates`. Then you will be able to run `dotnet new aurelia` (or `dotnet new vue`, etc.) to create your new application.
## Adding to existing applications
@@ -48,42 +64,28 @@ If you have an existing ASP.NET Core application, or if you just want to use the
* `Microsoft.AspNetCore.NodeServices`
* This provides a fast and robust way for .NET code to run JavaScript on the server inside a Node.js environment. You can use this to consume arbitrary functionality from NPM packages at runtime in your ASP.NET Core app.
* Most applications developers don't need to use this directly, but you can do so if you want to implement your own functionality that involves calling Node.js code from .NET at runtime.
- * Find [documentation and usage examples here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.NodeServices#microsoftaspnetcorenodeservices).
+ * Find [documentation and usage examples here](/src/Microsoft.AspNetCore.NodeServices#microsoftaspnetcorenodeservices).
* `Microsoft.AspNetCore.SpaServices`
- * This provides infrastructure that's generally useful when building Single Page Applications (SPAs) with technologies such as Angular 2 or React (for example, server-side prerendering and webpack middleware). Internally, it uses the `NodeServices` package to implement its features.
- * Find [documentation and usage examples here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#microsoftaspnetcorespaservices).
- * `Microsoft.AspNetCore.AngularServices`
- * This builds on the `SpaServices` package and includes features specific to Angular 2. Currently, this includes validation helpers and a "cache priming" feature, which let you pre-evaluate ajax requests on the server so that client-side code doesn't need to make network calls once it's loaded.
- * The code is [here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.AngularServices), and you'll find a usage example for [the validation helper here](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts), and for the [cache priming here](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/Views/Home/Index.cshtml#L7-8). Full docs are to be written.
+ * This provides infrastructure that's generally useful when building Single Page Applications (SPAs) with technologies such as Angular or React (for example, server-side prerendering and webpack middleware). Internally, it uses the `NodeServices` package to implement its features.
+ * Find [documentation and usage examples here](/src/Microsoft.AspNetCore.SpaServices#microsoftaspnetcorespaservices)
-There was previously a `Microsoft.AspNetCore.ReactServices` but this is not currently needed - all applicable functionality is in `Microsoft.AspNetCore.SpaServices`, because it's sufficiently general. We might add a new `Microsoft.AspNetCore.ReactServices` package in the future if new React-specific requirements emerge.
+There were previously other packages called `Microsoft.AspNetCore.AngularServices` and `Microsoft.AspNetCore.ReactServices` but these are not currently needed - all applicable functionality is in `Microsoft.AspNetCore.SpaServices`, because it's sufficiently general.
If you want to build a helper library for some other SPA framework, you can do so by taking a dependency on `Microsoft.AspNetCore.SpaServices` and wrapping its functionality in whatever way is most useful for your SPA framework.
-## Samples and templates
+## Samples
-Inside this repo, [the `templates` directory](https://github.com/aspnet/JavaScriptServices/tree/dev/templates) contains the application starting points that the `aspnetcore-spa` generator emits. If you want, you can clone this repo and run those applications directly. But it's easier to [use the Yeoman tool to run the generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/).
+The [`samples` directory](/samples) contains examples of:
-Also in this repo, [the `samples` directory](https://github.com/aspnet/JavaScriptServices/tree/dev/samples) contains examples of using the JavaScript services family of packages with Angular 2 and React, plus examples of standalone `NodeServices` usage for runtime code transpilation and image processing.
+- Using the JavaScript services family of packages with Angular and React.
+- A standalone `NodeServices` usage for runtime code transpilation and image processing.
**To run the samples:**
* Clone this repo
* At the repo's root directory (the one containing `src`, `samples`, etc.), run `dotnet restore`
- * Change directory to the sample you want to run (e.g., `cd samples/angular/MusicStore`)
+ * Change directory to the sample you want to run (for example, `cd samples/angular/MusicStore`)
* Restore Node dependencies by running `npm install`
- * If you're trying to run the Angular 2 "Music Store" sample, then also run `gulp` (which you need to have installed globally). None of the other samples require this.
+ * If you're trying to run the Angular "Music Store" sample, then also run `gulp` (which you need to have installed globally). None of the other samples require this.
* Run the application (`dotnet run`)
* Browse to [http://localhost:5000](http://localhost:5000)
-
-## Contributing
-
-If you're interested in contributing to the various packages, samples, and project templates in this repo, that's great! You can run the code in this repo just by:
-
- * Cloning the repo
- * Running `dotnet restore` at the repo root dir
- * Going to whatever sample or template you want to run (e.g., `cd templates/Angular2Spa`)
- * Restoring NPM dependencies (run `npm install`)
- * Launching it (`dotnet run`)
-
-If you're planning to submit a pull request, and if it's more than a trivial fix (e.g., for a typo), it's usually a good idea first to file an issue describing what you're proposing to do and how it will work. Then you can find out if it's likely that such a pull request will be accepted, and how it fits into wider ongoing plans.
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100755
index eb246166..00000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-init:
- - git config --global core.autocrlf true
-build_script:
- - build.cmd verify
-clone_depth: 1
-test: off
-deploy: off
diff --git a/build.cmd b/build.cmd
index 7d4894cb..c0050bda 100755
--- a/build.cmd
+++ b/build.cmd
@@ -1,2 +1,2 @@
@ECHO OFF
-PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"
\ No newline at end of file
+PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE"
diff --git a/build.ps1 b/build.ps1
deleted file mode 100644
index 8f2f9969..00000000
--- a/build.ps1
+++ /dev/null
@@ -1,67 +0,0 @@
-$ErrorActionPreference = "Stop"
-
-function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
-{
- while($true)
- {
- try
- {
- Invoke-WebRequest $url -OutFile $downloadLocation
- break
- }
- catch
- {
- $exceptionMessage = $_.Exception.Message
- Write-Host "Failed to download '$url': $exceptionMessage"
- if ($retries -gt 0) {
- $retries--
- Write-Host "Waiting 10 seconds before retrying. Retries left: $retries"
- Start-Sleep -Seconds 10
-
- }
- else
- {
- $exception = $_.Exception
- throw $exception
- }
- }
- }
-}
-
-cd $PSScriptRoot
-
-$repoFolder = $PSScriptRoot
-$env:REPO_FOLDER = $repoFolder
-
-$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
-if ($env:KOREBUILD_ZIP)
-{
- $koreBuildZip=$env:KOREBUILD_ZIP
-}
-
-$buildFolder = ".build"
-$buildFile="$buildFolder\KoreBuild.ps1"
-
-if (!(Test-Path $buildFolder)) {
- Write-Host "Downloading KoreBuild from $koreBuildZip"
-
- $tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
- New-Item -Path "$tempFolder" -Type directory | Out-Null
-
- $localZipFile="$tempFolder\korebuild.zip"
-
- DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6
-
- Add-Type -AssemblyName System.IO.Compression.FileSystem
- [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)
-
- New-Item -Path "$buildFolder" -Type directory | Out-Null
- copy-item "$tempFolder\**\build\*" $buildFolder -Recurse
-
- # Cleanup
- if (Test-Path $tempFolder) {
- Remove-Item -Recurse -Force $tempFolder
- }
-}
-
-&"$buildFile" $args
\ No newline at end of file
diff --git a/build.sh b/build.sh
index f4208100..98a4b227 100755
--- a/build.sh
+++ b/build.sh
@@ -1,46 +1,8 @@
#!/usr/bin/env bash
-repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-cd $repoFolder
-koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
-if [ ! -z $KOREBUILD_ZIP ]; then
- koreBuildZip=$KOREBUILD_ZIP
-fi
+set -euo pipefail
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-buildFolder=".build"
-buildFile="$buildFolder/KoreBuild.sh"
-
-if test ! -d $buildFolder; then
- echo "Downloading KoreBuild from $koreBuildZip"
-
- tempFolder="/tmp/KoreBuild-$(uuidgen)"
- mkdir $tempFolder
-
- localZipFile="$tempFolder/korebuild.zip"
-
- retries=6
- until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null)
- do
- echo "Failed to download '$koreBuildZip'"
- if [ "$retries" -le 0 ]; then
- exit 1
- fi
- retries=$((retries - 1))
- echo "Waiting 10 seconds before retrying. Retries left: $retries"
- sleep 10s
- done
-
- unzip -q -d $tempFolder $localZipFile
-
- mkdir $buildFolder
- cp -r $tempFolder/**/build/** $buildFolder
-
- chmod +x $buildFile
-
- # Cleanup
- if test ! -d $tempFolder; then
- rm -rf $tempFolder
- fi
-fi
-
-$buildFile -r $repoFolder "$@"
\ No newline at end of file
+# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs)
+chmod +x "$DIR/run.sh"; sync
+"$DIR/run.sh" default-build "$@"
diff --git a/tools/Key.snk b/build/Key.snk
similarity index 100%
rename from tools/Key.snk
rename to build/Key.snk
diff --git a/build/dependencies.props b/build/dependencies.props
new file mode 100644
index 00000000..40e13eba
--- /dev/null
+++ b/build/dependencies.props
@@ -0,0 +1,30 @@
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+
+
+ 3.0.0-build-20181114.5
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-alpha1-10742
+ 3.0.0-preview-181113-11
+ 3.0.0-preview-181113-11
+ 3.0.0-preview-181113-11
+ 3.0.0-preview-181113-11
+ 3.0.0-preview-181113-11
+ 3.0.0-preview1-26907-05
+ 3.0.0-alpha1-10742
+ 2.0.3
+ 11.0.2
+ 4.10.0-preview1-26907-04
+
+
+
+
diff --git a/build/repo.props b/build/repo.props
new file mode 100644
index 00000000..4402da1d
--- /dev/null
+++ b/build/repo.props
@@ -0,0 +1,13 @@
+
+
+
+
+
+ Internal.AspNetCore.Universe.Lineup
+ https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json
+
+
+
+
+
+
diff --git a/build/sources.props b/build/sources.props
new file mode 100644
index 00000000..9215df97
--- /dev/null
+++ b/build/sources.props
@@ -0,0 +1,17 @@
+
+
+
+
+ $(DotNetRestoreSources)
+
+ $(RestoreSources);
+ https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
+ https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
+ https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
+
+
+ $(RestoreSources);
+ https://api.nuget.org/v3/index.json;
+
+
+
diff --git a/global.json b/global.json
deleted file mode 100644
index 983ba040..00000000
--- a/global.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "projects": ["src"]
-}
diff --git a/korebuild-lock.txt b/korebuild-lock.txt
new file mode 100644
index 00000000..73613543
--- /dev/null
+++ b/korebuild-lock.txt
@@ -0,0 +1,2 @@
+version:3.0.0-build-20181114.5
+commithash:880e9a204d4ee4a18dfd83c9fb05a192a28bca60
diff --git a/korebuild.json b/korebuild.json
new file mode 100644
index 00000000..f098e7f9
--- /dev/null
+++ b/korebuild.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json",
+ "channel": "master",
+ "toolsets": {
+ "nodejs": {
+ "required": true,
+ "minVersion": "6.9"
+ }
+ }
+}
diff --git a/makefile.shade b/makefile.shade
deleted file mode 100755
index 4e9c487c..00000000
--- a/makefile.shade
+++ /dev/null
@@ -1,8 +0,0 @@
-
-var VERSION='0.1'
-var FULL_VERSION='0.1'
-var AUTHORS='Microsoft Open Technologies, Inc.'
-var SAMPLES_PROJECT_GLOB='templates/*/project.json'
-
-use-standard-lifecycle
-k-standard-goals
diff --git a/pack-local.sh b/pack-local.sh
deleted file mode 100755
index f807152a..00000000
--- a/pack-local.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-versionSuffix=$1
-dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-projects=(
- ./src/Microsoft.AspNetCore.NodeServices
- ./src/Microsoft.AspNetCore.SpaServices
- ./src/Microsoft.AspNetCore.AngularServices
- ./src/Microsoft.AspNetCore.ReactServices
-)
-
-if [ -z "$versionSuffix" ]; then
- echo "Usage: pack-local.sh "
- echo "Example: pack-local.sh beta-000001"
- exit 1
-fi
-
-pushd $dir > /dev/null
-
-for proj in "${projects[@]}"; do
- dotnet pack $proj --version-suffix $versionSuffix -o ./artifacts/
-done
-
-popd > /dev/null
diff --git a/run.cmd b/run.cmd
new file mode 100644
index 00000000..d52d5c7e
--- /dev/null
+++ b/run.cmd
@@ -0,0 +1,2 @@
+@ECHO OFF
+PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE"
diff --git a/run.ps1 b/run.ps1
new file mode 100644
index 00000000..34604c71
--- /dev/null
+++ b/run.ps1
@@ -0,0 +1,209 @@
+#!/usr/bin/env powershell
+#requires -version 4
+
+<#
+.SYNOPSIS
+Executes KoreBuild commands.
+
+.DESCRIPTION
+Downloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`.
+
+.PARAMETER Command
+The KoreBuild command to run.
+
+.PARAMETER Path
+The folder to build. Defaults to the folder containing this script.
+
+.PARAMETER Channel
+The channel of KoreBuild to download. Overrides the value from the config file.
+
+.PARAMETER DotNetHome
+The directory where .NET Core tools will be stored.
+
+.PARAMETER ToolsSource
+The base url where build tools can be downloaded. Overrides the value from the config file.
+
+.PARAMETER Update
+Updates KoreBuild to the latest version even if a lock file is present.
+
+.PARAMETER Reinstall
+Re-installs KoreBuild
+
+.PARAMETER ConfigFile
+The path to the configuration file that stores values. Defaults to korebuild.json.
+
+.PARAMETER ToolsSourceSuffix
+The Suffix to append to the end of the ToolsSource. Useful for query strings in blob stores.
+
+.PARAMETER CI
+Sets up CI specific settings and variables.
+
+.PARAMETER Arguments
+Arguments to be passed to the command
+
+.NOTES
+This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be.
+When the lockfile is not present, KoreBuild will create one using latest available version from $Channel.
+
+The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set
+in the file are overridden by command line parameters.
+
+.EXAMPLE
+Example config file:
+```json
+{
+ "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json",
+ "channel": "master",
+ "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools"
+}
+```
+#>
+[CmdletBinding(PositionalBinding = $false)]
+param(
+ [Parameter(Mandatory = $true, Position = 0)]
+ [string]$Command,
+ [string]$Path = $PSScriptRoot,
+ [Alias('c')]
+ [string]$Channel,
+ [Alias('d')]
+ [string]$DotNetHome,
+ [Alias('s')]
+ [string]$ToolsSource,
+ [Alias('u')]
+ [switch]$Update,
+ [switch]$Reinstall,
+ [string]$ToolsSourceSuffix,
+ [string]$ConfigFile = $null,
+ [switch]$CI,
+ [Parameter(ValueFromRemainingArguments = $true)]
+ [string[]]$Arguments
+)
+
+Set-StrictMode -Version 2
+$ErrorActionPreference = 'Stop'
+
+#
+# Functions
+#
+
+function Get-KoreBuild {
+
+ $lockFile = Join-Path $Path 'korebuild-lock.txt'
+
+ if (!(Test-Path $lockFile) -or $Update) {
+ Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile $ToolsSourceSuffix
+ }
+
+ $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1
+ if (!$version) {
+ Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'"
+ }
+ $version = $version.TrimStart('version:').Trim()
+ $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version)
+
+ if ($Reinstall -and (Test-Path $korebuildPath)) {
+ Remove-Item -Force -Recurse $korebuildPath
+ }
+
+ if (!(Test-Path $korebuildPath)) {
+ Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version"
+ New-Item -ItemType Directory -Path $korebuildPath | Out-Null
+ $remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip"
+
+ try {
+ $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip"
+ Get-RemoteFile $remotePath $tmpfile $ToolsSourceSuffix
+ if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) {
+ # Use built-in commands where possible as they are cross-plat compatible
+ Microsoft.PowerShell.Archive\Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath
+ }
+ else {
+ # Fallback to old approach for old installations of PowerShell
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+ [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath)
+ }
+ }
+ catch {
+ Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore
+ throw
+ }
+ finally {
+ Remove-Item $tmpfile -ErrorAction Ignore
+ }
+ }
+
+ return $korebuildPath
+}
+
+function Join-Paths([string]$path, [string[]]$childPaths) {
+ $childPaths | ForEach-Object { $path = Join-Path $path $_ }
+ return $path
+}
+
+function Get-RemoteFile([string]$RemotePath, [string]$LocalPath, [string]$RemoteSuffix) {
+ if ($RemotePath -notlike 'http*') {
+ Copy-Item $RemotePath $LocalPath
+ return
+ }
+
+ $retries = 10
+ while ($retries -gt 0) {
+ $retries -= 1
+ try {
+ Invoke-WebRequest -UseBasicParsing -Uri $($RemotePath + $RemoteSuffix) -OutFile $LocalPath
+ return
+ }
+ catch {
+ Write-Verbose "Request failed. $retries retries remaining"
+ }
+ }
+
+ Write-Error "Download failed: '$RemotePath'."
+}
+
+#
+# Main
+#
+
+# Load configuration or set defaults
+
+$Path = Resolve-Path $Path
+if (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' }
+
+if (Test-Path $ConfigFile) {
+ try {
+ $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json
+ if ($config) {
+ if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel }
+ if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource}
+ }
+ }
+ catch {
+ Write-Host -ForegroundColor Red $Error[0]
+ Write-Error "$ConfigFile contains invalid JSON."
+ exit 1
+ }
+}
+
+if (!$DotNetHome) {
+ $DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } `
+ elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} `
+ elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}`
+ else { Join-Path $PSScriptRoot '.dotnet'}
+}
+
+if (!$Channel) { $Channel = 'master' }
+if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' }
+
+# Execute
+
+$korebuildPath = Get-KoreBuild
+Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1')
+
+try {
+ Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI
+ Invoke-KoreBuildCommand $Command @Arguments
+}
+finally {
+ Remove-Module 'KoreBuild' -ErrorAction Ignore
+}
diff --git a/run.sh b/run.sh
new file mode 100755
index 00000000..4c1fed56
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,256 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+#
+# variables
+#
+
+RESET="\033[0m"
+RED="\033[0;31m"
+YELLOW="\033[0;33m"
+MAGENTA="\033[0;95m"
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet"
+verbose=false
+update=false
+reinstall=false
+repo_path="$DIR"
+channel=''
+tools_source=''
+tools_source_suffix=''
+ci=false
+
+#
+# Functions
+#
+__usage() {
+ echo "Usage: $(basename "${BASH_SOURCE[0]}") command [options] [[--] ...]"
+ echo ""
+ echo "Arguments:"
+ echo " command The command to be run."
+ echo " ... Arguments passed to the command. Variable number of arguments allowed."
+ echo ""
+ echo "Options:"
+ echo " --verbose Show verbose output."
+ echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.."
+ echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json."
+ echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet."
+ echo " --path The directory to build. Defaults to the directory containing the script."
+ echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file."
+ echo " --tools-source-suffix|-ToolsSourceSuffix The suffix to append to tools-source. Useful for query strings."
+ echo " -u|--update Update to the latest KoreBuild even if the lock file is present."
+ echo " --reinstall Reinstall KoreBuild."
+ echo " --ci Apply CI specific settings and environment variables."
+ echo ""
+ echo "Description:"
+ echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be."
+ echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel."
+
+ if [[ "${1:-}" != '--no-exit' ]]; then
+ exit 2
+ fi
+}
+
+get_korebuild() {
+ local version
+ local lock_file="$repo_path/korebuild-lock.txt"
+ if [ ! -f "$lock_file" ] || [ "$update" = true ]; then
+ __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" "$tools_source_suffix"
+ fi
+ version="$(grep 'version:*' -m 1 "$lock_file")"
+ if [[ "$version" == '' ]]; then
+ __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'"
+ return 1
+ fi
+ version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
+ local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version"
+
+ if [ "$reinstall" = true ] && [ -d "$korebuild_path" ]; then
+ rm -rf "$korebuild_path"
+ fi
+
+ {
+ if [ ! -d "$korebuild_path" ]; then
+ mkdir -p "$korebuild_path"
+ local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip"
+ tmpfile="$(mktemp)"
+ echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}"
+ if __get_remote_file "$remote_path" "$tmpfile" "$tools_source_suffix"; then
+ unzip -q -d "$korebuild_path" "$tmpfile"
+ fi
+ rm "$tmpfile" || true
+ fi
+
+ source "$korebuild_path/KoreBuild.sh"
+ } || {
+ if [ -d "$korebuild_path" ]; then
+ echo "Cleaning up after failed installation"
+ rm -rf "$korebuild_path" || true
+ fi
+ return 1
+ }
+}
+
+__error() {
+ echo -e "${RED}error: $*${RESET}" 1>&2
+}
+
+__warn() {
+ echo -e "${YELLOW}warning: $*${RESET}"
+}
+
+__machine_has() {
+ hash "$1" > /dev/null 2>&1
+ return $?
+}
+
+__get_remote_file() {
+ local remote_path=$1
+ local local_path=$2
+ local remote_path_suffix=$3
+
+ if [[ "$remote_path" != 'http'* ]]; then
+ cp "$remote_path" "$local_path"
+ return 0
+ fi
+
+ local failed=false
+ if __machine_has wget; then
+ wget --tries 10 --quiet -O "$local_path" "${remote_path}${remote_path_suffix}" || failed=true
+ else
+ failed=true
+ fi
+
+ if [ "$failed" = true ] && __machine_has curl; then
+ failed=false
+ curl --retry 10 -sSL -f --create-dirs -o "$local_path" "${remote_path}${remote_path_suffix}" || failed=true
+ fi
+
+ if [ "$failed" = true ]; then
+ __error "Download failed: $remote_path" 1>&2
+ return 1
+ fi
+}
+
+#
+# main
+#
+
+command="${1:-}"
+shift
+
+while [[ $# -gt 0 ]]; do
+ case $1 in
+ -\?|-h|--help)
+ __usage --no-exit
+ exit 0
+ ;;
+ -c|--channel|-Channel)
+ shift
+ channel="${1:-}"
+ [ -z "$channel" ] && __usage
+ ;;
+ --config-file|-ConfigFile)
+ shift
+ config_file="${1:-}"
+ [ -z "$config_file" ] && __usage
+ if [ ! -f "$config_file" ]; then
+ __error "Invalid value for --config-file. $config_file does not exist."
+ exit 1
+ fi
+ ;;
+ -d|--dotnet-home|-DotNetHome)
+ shift
+ DOTNET_HOME="${1:-}"
+ [ -z "$DOTNET_HOME" ] && __usage
+ ;;
+ --path|-Path)
+ shift
+ repo_path="${1:-}"
+ [ -z "$repo_path" ] && __usage
+ ;;
+ -s|--tools-source|-ToolsSource)
+ shift
+ tools_source="${1:-}"
+ [ -z "$tools_source" ] && __usage
+ ;;
+ --tools-source-suffix|-ToolsSourceSuffix)
+ shift
+ tools_source_suffix="${1:-}"
+ [ -z "$tools_source_suffix" ] && __usage
+ ;;
+ -u|--update|-Update)
+ update=true
+ ;;
+ --reinstall|-[Rr]einstall)
+ reinstall=true
+ ;;
+ --ci|-[Cc][Ii])
+ ci=true
+ ;;
+ --verbose|-Verbose)
+ verbose=true
+ ;;
+ --)
+ shift
+ break
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+if ! __machine_has unzip; then
+ __error 'Missing required command: unzip'
+ exit 1
+fi
+
+if ! __machine_has curl && ! __machine_has wget; then
+ __error 'Missing required command. Either wget or curl is required.'
+ exit 1
+fi
+
+[ -z "${config_file:-}" ] && config_file="$repo_path/korebuild.json"
+if [ -f "$config_file" ]; then
+ if __machine_has jq ; then
+ if jq '.' "$config_file" >/dev/null ; then
+ config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")"
+ config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")"
+ else
+ __error "$config_file contains invalid JSON."
+ exit 1
+ fi
+ elif __machine_has python ; then
+ if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then
+ config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")"
+ config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")"
+ else
+ __error "$config_file contains invalid JSON."
+ exit 1
+ fi
+ elif __machine_has python3 ; then
+ if python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then
+ config_channel="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")"
+ config_tools_source="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")"
+ else
+ __error "$config_file contains invalid JSON."
+ exit 1
+ fi
+ else
+ __error 'Missing required command: jq or python. Could not parse the JSON file.'
+ exit 1
+ fi
+
+ [ ! -z "${config_channel:-}" ] && channel="$config_channel"
+ [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source"
+fi
+
+[ -z "$channel" ] && channel='master'
+[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools'
+
+get_korebuild
+set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci"
+invoke_korebuild_command "$command" "$@"
diff --git a/samples/angular/MusicStore/.gitignore b/samples/angular/MusicStore/.gitignore
deleted file mode 100644
index 762a3e6c..00000000
--- a/samples/angular/MusicStore/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-/node_modules/
-/wwwroot/lib/
-/wwwroot/ng-app/**/*.js
-/project.lock.json
-/music-db.sqlite
-/Properties/launchSettings.json
-
-# Obviously you don't really want your DB to go in wwwroot, but due to https://github.com/aspnet/Microsoft.Data.Sqlite/issues/188
-# it currently does when run from IIS Express. Will resolve this once RC2 is out, which is supposed to eliminate the inconsistency.
-/wwwroot/music-db.sqlite
diff --git a/samples/angular/MusicStore/Apis/AlbumsApiController.cs b/samples/angular/MusicStore/Apis/AlbumsApiController.cs
deleted file mode 100644
index 3b98a1eb..00000000
--- a/samples/angular/MusicStore/Apis/AlbumsApiController.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using AutoMapper;
-using MusicStore.Models;
-using MusicStore.Infrastructure;
-
-namespace MusicStore.Apis
-{
- [Route("api/albums")]
- public class AlbumsApiController : Controller
- {
- private readonly MusicStoreContext _storeContext;
-
- public AlbumsApiController(MusicStoreContext storeContext)
- {
- _storeContext = storeContext;
- }
-
- [HttpGet]
- [NoCache]
- public async Task Paged(int page = 1, int pageSize = 50, string sortBy = null)
- {
- await _storeContext.Genres.LoadAsync();
- await _storeContext.Artists.LoadAsync();
-
- var albums = await _storeContext.Albums
- .Include(a => a.Genre)
- .Include(a => a.Artist)
- .ToPagedListAsync(page, pageSize, sortBy,
- a => a.Title, // sortExpression
- SortDirection.Ascending, // defaultSortDirection
- a => Mapper.Map(a, new AlbumResultDto())); // selector
-
- return Json(albums);
- }
-
- [HttpGet("all")]
- [NoCache]
- public async Task All()
- {
- var albums = await _storeContext.Albums
- .Include(a => a.Genre)
- .Include(a => a.Artist)
- .OrderBy(a => a.Title)
- .ToListAsync();
-
- return Json(albums.Select(a => Mapper.Map(a, new AlbumResultDto())));
- }
-
- [HttpGet("mostPopular")]
- [NoCache]
- public async Task MostPopular(int count = 6)
- {
- count = count > 0 && count < 20 ? count : 6;
- var albums = await _storeContext.Albums
- .OrderByDescending(a => a.OrderDetails.Count())
- .Take(count)
- .ToListAsync();
-
- // TODO: Move the .Select() to end of albums query when EF supports it
- return Json(albums.Select(a => Mapper.Map(a, new AlbumResultDto())));
- }
-
- [HttpGet("{albumId:int}")]
- [NoCache]
- public async Task Details(int albumId)
- {
- await _storeContext.Genres.LoadAsync();
- await _storeContext.Artists.LoadAsync();
-
- var album = await _storeContext.Albums
- .Include(a => a.Artist)
- .Include(a => a.Genre)
- .Where(a => a.AlbumId == albumId)
- .SingleOrDefaultAsync();
-
- var albumResult = Mapper.Map(album, new AlbumResultDto());
-
- // TODO: Add null checking and return 404 in that case
-
- return Json(albumResult);
- }
-
- [HttpPost]
- [Authorize("app-ManageStore")]
- public async Task CreateAlbum([FromBody]AlbumChangeDto album)
- {
- if (!ModelState.IsValid)
- {
- // Return the model errors
- return BadRequest(ModelState);
- }
-
- // Save the changes to the DB
- var dbAlbum = new Album();
- _storeContext.Albums.Add(Mapper.Map(album, dbAlbum));
- await _storeContext.SaveChangesAsync();
-
- // TODO: Handle missing record, key violations, concurrency issues, etc.
-
- return new ObjectResult(new {
- Data = dbAlbum.AlbumId,
- Message = "Album created successfully."
- });
- }
-
- [HttpPut("{albumId:int}/update")]
- public async Task UpdateAlbum(int albumId, [FromBody] AlbumChangeDto album)
- {
- if (!ModelState.IsValid)
- {
- // Return the model errors
- return BadRequest(ModelState);
- }
-
- var dbAlbum = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId);
-
- if (dbAlbum == null)
- {
- return new ObjectResult(new {
- Message = string.Format("The album with ID {0} was not found.", albumId)
- }) { StatusCode = 404 };
- }
-
- // Save the changes to the DB
- Mapper.Map(album, dbAlbum);
- await _storeContext.SaveChangesAsync();
-
- // TODO: Handle missing record, key violations, concurrency issues, etc.
-
- return new ObjectResult (new {
- Message = "Album updated successfully."
- });
- }
-
- [HttpDelete("{albumId:int}")]
- [Authorize("app-ManageStore")]
- public async Task DeleteAlbum(int albumId)
- {
- var album = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId);
-
- if (album != null)
- {
- _storeContext.Albums.Remove(album);
-
- // Save the changes to the DB
- await _storeContext.SaveChangesAsync();
-
- // TODO: Handle missing record, key violations, concurrency issues, etc.
- }
-
- return new ObjectResult (new {
- Message = "Album deleted successfully."
- });
- }
- }
-
- [ModelMetadataType(typeof(Album))]
- public class AlbumChangeDto : IValidatableObject
- {
- public int GenreId { get; set; }
-
- public int ArtistId { get; set; }
-
- public string Title { get; set; }
-
- public decimal Price { get; set; }
-
- public string AlbumArtUrl { get; set; }
-
- public IEnumerable Validate(ValidationContext validationContext)
- {
- // An example of object-level (i.e., multi-property) validation
- if (this.GenreId == 13 /* Indie */) {
- switch (SentimentAnalysis.GetSentiment(Title)) {
- case SentimentAnalysis.SentimentResult.Positive:
- yield return new ValidationResult("Sounds too positive. Indie music requires more ambiguity.");
- break;
- case SentimentAnalysis.SentimentResult.Negative:
- yield return new ValidationResult("Sounds too negative. Indie music requires more ambiguity.");
- break;
- }
- }
- }
- }
-
- public class AlbumResultDto : AlbumChangeDto
- {
- public AlbumResultDto()
- {
- Artist = new ArtistResultDto();
- Genre = new GenreResultDto();
- }
-
- public int AlbumId { get; set; }
-
- public ArtistResultDto Artist { get; private set; }
-
- public GenreResultDto Genre { get; private set; }
- }
-
- public class ArtistResultDto
- {
- public string Name { get; set; }
- }
-
- public class GenreResultDto
- {
- public string Name { get; set; }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/ArtistsApiController.cs b/samples/angular/MusicStore/Apis/ArtistsApiController.cs
deleted file mode 100644
index f3568aeb..00000000
--- a/samples/angular/MusicStore/Apis/ArtistsApiController.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using MusicStore.Models;
-
-namespace MusicStore.Apis
-{
- [Route("api/artists")]
- public class ArtistsApiController : Controller
- {
- private readonly MusicStoreContext _storeContext;
-
- public ArtistsApiController(MusicStoreContext storeContext)
- {
- _storeContext = storeContext;
- }
-
- [HttpGet("lookup")]
- public async Task Lookup()
- {
- var artists = await _storeContext.Artists
- .OrderBy(a => a.Name)
- .ToListAsync();
-
- return Json(artists);
- }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/GenresApiController.cs b/samples/angular/MusicStore/Apis/GenresApiController.cs
deleted file mode 100644
index 338ca2fc..00000000
--- a/samples/angular/MusicStore/Apis/GenresApiController.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using MusicStore.Models;
-using MusicStore.Infrastructure;
-
-namespace MusicStore.Apis
-{
- [Route("api/genres")]
- public class GenresApiController : Controller
- {
- private readonly MusicStoreContext _storeContext;
-
- public GenresApiController(MusicStoreContext storeContext)
- {
- _storeContext = storeContext;
- }
-
- [HttpGet]
- public async Task GenreList()
- {
- var genres = await _storeContext.Genres
- //.Include(g => g.Albums)
- .OrderBy(g => g.Name)
- .ToListAsync();
-
- return Json(genres);
- }
-
- [HttpGet("genre-lookup")]
- public async Task Lookup()
- {
- var genres = await _storeContext.Genres
- .Select(g => new { g.GenreId, g.Name })
- .ToListAsync();
-
- return Json(genres);
- }
-
- [HttpGet("menu")]
- public async Task GenreMenuList(int count = 9)
- {
- count = count > 0 && count < 20 ? count : 9;
-
- var genres = await _storeContext.Genres
- .OrderByDescending(g =>
- g.Albums.Sum(a =>
- a.OrderDetails.Sum(od => od.Quantity)))
- .Take(count)
- .ToListAsync();
-
- return Json(genres);
- }
-
- [HttpGet("{genreId:int}/albums")]
- [NoCache]
- public async Task GenreAlbums(int genreId)
- {
- var albums = await _storeContext.Albums
- .Where(a => a.GenreId == genreId)
- //.Include(a => a.Genre)
- //.Include(a => a.Artist)
- //.OrderBy(a => a.Genre.Name)
- .ToListAsync();
-
- return Json(albums);
- }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs b/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs
deleted file mode 100644
index 831978a5..00000000
--- a/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- public class ExternalLoginConfirmationViewModel
- {
- [Required]
- [Display(Name = "User name")]
- public string UserName { get; set; }
- }
-
- public class ManageUserViewModel
- {
- [Required]
- [DataType(DataType.Password)]
- [Display(Name = "Current password")]
- public string OldPassword { get; set; }
-
- [Required]
- [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
- [DataType(DataType.Password)]
- [Display(Name = "New password")]
- public string NewPassword { get; set; }
-
- [DataType(DataType.Password)]
- [Display(Name = "Confirm new password")]
- [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
- public string ConfirmPassword { get; set; }
- }
-
- public class LoginViewModel
- {
- [Required]
- [Display(Name = "User name")]
- public string UserName { get; set; }
-
- [Required]
- [DataType(DataType.Password)]
- [Display(Name = "Password")]
- public string Password { get; set; }
-
- [Display(Name = "Remember me?")]
- public bool RememberMe { get; set; }
- }
-
- public class RegisterViewModel
- {
- [Required]
- [Display(Name = "User name")]
- public string UserName { get; set; }
-
- [Required]
- [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
- [DataType(DataType.Password)]
- [Display(Name = "Password")]
- public string Password { get; set; }
-
- [DataType(DataType.Password)]
- [Display(Name = "Confirm password")]
- [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
- public string ConfirmPassword { get; set; }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/Album.cs b/samples/angular/MusicStore/Apis/Models/Album.cs
deleted file mode 100644
index b4495f34..00000000
--- a/samples/angular/MusicStore/Apis/Models/Album.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- public class Album
- {
- public Album()
- {
- // TODO: Temporary hack to populate the orderdetails until EF does this automatically.
- OrderDetails = new List();
- }
-
- [ScaffoldColumn(false)]
- public int AlbumId { get; set; }
-
- public int GenreId { get; set; }
-
- public int ArtistId { get; set; }
-
- [Required]
- [StringLength(160, MinimumLength = 2)]
- public string Title { get; set; }
-
- [Required]
- [RangeAttribute(typeof(decimal), "0.01", "100")] // Long-form constructor to work around https://github.com/dotnet/coreclr/issues/2172
- [DataType(DataType.Currency)]
- public decimal Price { get; set; }
-
- [Display(Name = "Album Art URL")]
- [StringLength(1024)]
- public string AlbumArtUrl { get; set; }
-
- public virtual Genre Genre { get; set; }
-
- public virtual Artist Artist { get; set; }
-
- public virtual ICollection OrderDetails { get; set; }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/Artist.cs b/samples/angular/MusicStore/Apis/Models/Artist.cs
deleted file mode 100644
index b364a898..00000000
--- a/samples/angular/MusicStore/Apis/Models/Artist.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- public class Artist
- {
- public int ArtistId { get; set; }
-
- [Required]
- public string Name { get; set; }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/CartItem.cs b/samples/angular/MusicStore/Apis/Models/CartItem.cs
deleted file mode 100644
index 7209462d..00000000
--- a/samples/angular/MusicStore/Apis/Models/CartItem.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- public class CartItem
- {
- [Key]
- public int CartItemId { get; set; }
-
- [Required]
- public string CartId { get; set; }
- public int AlbumId { get; set; }
- public int Count { get; set; }
-
- [DataType(DataType.DateTime)]
- public DateTime DateCreated { get; set; }
-
- public virtual Album Album { get; set; }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/Genre.cs b/samples/angular/MusicStore/Apis/Models/Genre.cs
deleted file mode 100644
index eed5616c..00000000
--- a/samples/angular/MusicStore/Apis/Models/Genre.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using Newtonsoft.Json;
-
-namespace MusicStore.Models
-{
- public class Genre
- {
- public Genre()
- {
- Albums = new List();
- }
-
- public int GenreId { get; set; }
-
- [Required]
- public string Name { get; set; }
-
- public string Description { get; set; }
-
- [JsonIgnore]
- public virtual ICollection Albums { get; set; }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs b/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs
deleted file mode 100644
index aee7aedd..00000000
--- a/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore;
-
-namespace MusicStore.Models
-{
- public class ApplicationUser : IdentityUser { }
-
- public class MusicStoreContext : IdentityDbContext
- {
- public MusicStoreContext(DbContextOptions options) : base(options)
- {
- }
-
- public DbSet Albums { get; set; }
- public DbSet Artists { get; set; }
- public DbSet Orders { get; set; }
- public DbSet Genres { get; set; }
- public DbSet CartItems { get; set; }
- public DbSet OrderDetails { get; set; }
-
- protected override void OnModelCreating(ModelBuilder builder)
- {
- // Configure pluralization
- builder.Entity().ToTable("Albums");
- builder.Entity().ToTable("Artists");
- builder.Entity().ToTable("Orders");
- builder.Entity().ToTable("Genres");
- builder.Entity().ToTable("CartItems");
- builder.Entity().ToTable("OrderDetails");
-
- base.OnModelCreating(builder);
- }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/Order.cs b/samples/angular/MusicStore/Apis/Models/Order.cs
deleted file mode 100644
index 110a77d8..00000000
--- a/samples/angular/MusicStore/Apis/Models/Order.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- //[Bind(Include = "FirstName,LastName,Address,City,State,PostalCode,Country,Phone,Email")]
- public class Order
- {
- public Order()
- {
- OrderDetails = new List();
- }
-
- [ScaffoldColumn(false)]
- public int OrderId { get; set; }
-
- [ScaffoldColumn(false)]
- public DateTime OrderDate { get; set; }
-
- [Required]
- [ScaffoldColumn(false)]
- public string Username { get; set; }
-
- [Required]
- [Display(Name = "First Name")]
- [StringLength(160)]
- public string FirstName { get; set; }
-
- [Required]
- [Display(Name = "Last Name")]
- [StringLength(160)]
- public string LastName { get; set; }
-
- [Required]
- [StringLength(70, MinimumLength = 3)]
- public string Address { get; set; }
-
- [Required]
- [StringLength(40)]
- public string City { get; set; }
-
- [Required]
- [StringLength(40)]
- public string State { get; set; }
-
- [Required]
- [Display(Name = "Postal Code")]
- [StringLength(10, MinimumLength = 5)]
- public string PostalCode { get; set; }
-
- [Required]
- [StringLength(40)]
- public string Country { get; set; }
-
- [Required]
- [StringLength(24)]
- [DataType(DataType.PhoneNumber)]
- public string Phone { get; set; }
-
- [Required]
- [Display(Name = "Email Address")]
- [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}",
- ErrorMessage = "Email is not valid.")]
- [DataType(DataType.EmailAddress)]
- public string Email { get; set; }
-
- [ScaffoldColumn(false)]
- public decimal Total { get; set; }
-
- public ICollection OrderDetails { get; set; }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/OrderDetail.cs b/samples/angular/MusicStore/Apis/Models/OrderDetail.cs
deleted file mode 100644
index cb1e6930..00000000
--- a/samples/angular/MusicStore/Apis/Models/OrderDetail.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace MusicStore.Models
-{
- public class OrderDetail
- {
- public int OrderDetailId { get; set; }
- public int OrderId { get; set; }
- public int AlbumId { get; set; }
- public int Quantity { get; set; }
- public decimal UnitPrice { get; set; }
-
- public virtual Album Album { get; set; }
- public virtual Order Order { get; set; }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/SampleData.cs b/samples/angular/MusicStore/Apis/Models/SampleData.cs
deleted file mode 100644
index b1d98a7c..00000000
--- a/samples/angular/MusicStore/Apis/Models/SampleData.cs
+++ /dev/null
@@ -1,915 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Claims;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Identity;
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Options;
-
-namespace MusicStore.Models
-{
- public static class SampleData
- {
- const string imgUrl = "/images/placeholder.png";
-
- public static async Task InitializeMusicStoreDatabaseAsync(IServiceProvider serviceProvider)
- {
- using (var db = serviceProvider.GetService())
- {
- if (await db.Database.EnsureCreatedAsync())
- {
- await InsertTestData(serviceProvider);
- }
- }
- }
-
- private static async Task InsertTestData(IServiceProvider serviceProvider)
- {
- var albums = GetAlbums(imgUrl, Genres, Artists);
- await AddOrUpdateAsync(serviceProvider, g => g.GenreId, Genres.Select(genre => genre.Value));
- await AddOrUpdateAsync(serviceProvider, a => a.ArtistId, Artists.Select(artist => artist.Value));
- await AddOrUpdateAsync(serviceProvider, a => a.AlbumId, albums);
- }
-
- // TODO [EF] This may be replaced by a first class mechanism in EF
- private static async Task AddOrUpdateAsync(
- IServiceProvider serviceProvider,
- Func propertyToMatch, IEnumerable entities)
- where TEntity : class
- {
- // Query in a separate context so that we can attach existing entities as modified
- List existingData;
-
- using (var scope = serviceProvider.GetRequiredService().CreateScope())
- using (var db = scope.ServiceProvider.GetService())
- {
- existingData = db.Set().ToList();
- }
-
- using (var scope = serviceProvider.GetRequiredService().CreateScope())
- using (var db = scope.ServiceProvider.GetService())
- {
- foreach (var item in entities)
- {
- db.Entry(item).State = existingData.Any(g => propertyToMatch(g).Equals(propertyToMatch(item)))
- ? EntityState.Modified
- : EntityState.Added;
- }
-
- await db.SaveChangesAsync();
- }
- }
-
- private static Album[] GetAlbums(string imgUrl, Dictionary genres, Dictionary artists)
- {
- var albums = new Album[]
- {
- new Album { Title = "The Best Of The Men At Work", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Men At Work"], AlbumArtUrl = imgUrl },
- new Album { Title = "...And Justice For All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "עד גבול האור", Genre = genres["World"], Price = 8.99M, Artist = artists["אריק אינשטיין"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black Light Syndrome", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Terry Bozzio, Tony Levin & Steve Stevens"], AlbumArtUrl = imgUrl },
- new Album { Title = "10,000 Days", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl },
- new Album { Title = "11i", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Supreme Beings of Leisure"], AlbumArtUrl = imgUrl },
- new Album { Title = "1960", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Soul-Junk"], AlbumArtUrl = imgUrl },
- new Album { Title = "4x4=12 ", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["deadmau5"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Copland Celebration, Vol. I", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Symphony Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Lively Mind", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Paul Oakenfold"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Matter of Life and Death", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Real Dead One", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Real Live One", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Rush of Blood to the Head", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Coldplay"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Soprano Inspired", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Britten Sinfonia, Ivor Bolton & Lesley Garrett"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Winter Symphony", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Abbey Road", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ace Of Spades", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Motörhead"], AlbumArtUrl = imgUrl },
- new Album { Title = "Achtung Baby", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Acústico MTV", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl },
- new Album { Title = "Adams, John: The Chairman Dances", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Edo de Waart & San Francisco Symphony"], AlbumArtUrl = imgUrl },
- new Album { Title = "Adrenaline", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deftones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ænima", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl },
- new Album { Title = "Afrociberdelia", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Science & Nação Zumbi"], AlbumArtUrl = imgUrl },
- new Album { Title = "After the Goldrush", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Neil Young"], AlbumArtUrl = imgUrl },
- new Album { Title = "Airdrawn Dagger", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Sasha"], AlbumArtUrl = imgUrl },
- new Album { Title = "Album Title Goes Here", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["deadmau5"], AlbumArtUrl = imgUrl },
- new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 1]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Label Society"], AlbumArtUrl = imgUrl },
- new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 2]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Label Society"], AlbumArtUrl = imgUrl },
- new Album { Title = "Alive 2007", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Daft Punk"], AlbumArtUrl = imgUrl },
- new Album { Title = "All I Ask of You", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Amen (So Be It)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paddy Casey"], AlbumArtUrl = imgUrl },
- new Album { Title = "Animal Vehicle", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Axis of Awesome"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ao Vivo [IMPORT]", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Zeca Pagodinho"], AlbumArtUrl = imgUrl },
- new Album { Title = "Apocalyptic Love", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Slash"], AlbumArtUrl = imgUrl },
- new Album { Title = "Appetite for Destruction", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Are You Experienced?", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Jimi Hendrix"], AlbumArtUrl = imgUrl },
- new Album { Title = "Arquivo II", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl },
- new Album { Title = "Arquivo Os Paralamas Do Sucesso", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl },
- new Album { Title = "A-Sides", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Soundgarden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Audioslave", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Audioslave"], AlbumArtUrl = imgUrl },
- new Album { Title = "Automatic for the People", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["R.E.M."], AlbumArtUrl = imgUrl },
- new Album { Title = "Axé Bahia 2001", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl },
- new Album { Title = "Babel", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Mumford & Sons"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bach: Goldberg Variations", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Wilhelm Kempff"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bach: The Brandenburg Concertos", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Orchestra of The Age of Enlightenment"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bach: The Cello Suites", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Yo-Yo Ma"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bach: Toccata & Fugue in D Minor", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Ton Koopman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bad Motorfinger", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Soundgarden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Balls to the Wall", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Accept"], AlbumArtUrl = imgUrl },
- new Album { Title = "Banadeek Ta'ala", Genre = genres["World"], Price = 8.99M, Artist = artists["Amr Diab"], AlbumArtUrl = imgUrl },
- new Album { Title = "Barbie Girl", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Aqua"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bark at the Moon (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bartok: Violin & Viola Concertos", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Yehudi Menuhin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Barulhinho Bom", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Marisa Monte"], AlbumArtUrl = imgUrl },
- new Album { Title = "BBC Sessions [Disc 1] [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "BBC Sessions [Disc 2] [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Be Here Now", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Oasis"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bedrock 11 Compiled & Mixed", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["John Digweed"], AlbumArtUrl = imgUrl },
- new Album { Title = "Berlioz: Symphonie Fantastique", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Michael Tilson Thomas"], AlbumArtUrl = imgUrl },
- new Album { Title = "Beyond Good And Evil", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Cult"], AlbumArtUrl = imgUrl },
- new Album { Title = "Big Bad Wolf ", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Armand Van Helden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Big Ones", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Aerosmith"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black Album", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black Sabbath Vol. 4 (Remaster)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Sabbath"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black Sabbath", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Sabbath"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blackwater Park", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Opeth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blizzard of Ozz", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blood", Genre = genres["Rock"], Price = 8.99M, Artist = artists["In This Moment"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blue Moods", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Incognito"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blue", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Weezer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bongo Fury", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Frank Zappa & Captain Beefheart"], AlbumArtUrl = imgUrl },
- new Album { Title = "Boys & Girls", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alabama Shakes"], AlbumArtUrl = imgUrl },
- new Album { Title = "Brave New World", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "B-Sides 1980-1990", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bunkka", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Paul Oakenfold"], AlbumArtUrl = imgUrl },
- new Album { Title = "By The Way", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Red Hot Chili Peppers"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cake: B-Sides and Rarities", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Cake"], AlbumArtUrl = imgUrl },
- new Album { Title = "Californication", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Red Hot Chili Peppers"], AlbumArtUrl = imgUrl },
- new Album { Title = "Carmina Burana", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Boston Symphony Orchestra & Seiji Ozawa"], AlbumArtUrl = imgUrl },
- new Album { Title = "Carried to Dust (Bonus Track Version)", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Calexico"], AlbumArtUrl = imgUrl },
- new Album { Title = "Carry On", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Chris Cornell"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cássia Eller - Sem Limite [Disc 1]", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cássia Eller"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chemical Wedding", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Bruce Dickinson"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chill: Brazil (Disc 1)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Marcos Valle"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chill: Brazil (Disc 2)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Antônio Carlos Jobim"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chocolate Starfish And The Hot Dog Flavored Water", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Limp Bizkit"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chronicle, Vol. 1", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Creedence Clearwater Revival"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chronicle, Vol. 2", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Creedence Clearwater Revival"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ciao, Baby", Genre = genres["Rock"], Price = 8.99M, Artist = artists["TheStart"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cidade Negra - Hits", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cidade Negra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Classic Munkle: Turbo Edition", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Munkle"], AlbumArtUrl = imgUrl },
- new Album { Title = "Classics: The Best of Sarah Brightman", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Coda", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Come Away With Me", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Norah Jones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Come Taste The Band", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Comfort Eagle", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Cake"], AlbumArtUrl = imgUrl },
- new Album { Title = "Common Reaction", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Uh Huh Her "], AlbumArtUrl = imgUrl },
- new Album { Title = "Compositores", Genre = genres["Rock"], Price = 8.99M, Artist = artists["O Terço"], AlbumArtUrl = imgUrl },
- new Album { Title = "Contraband", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Velvet Revolver"], AlbumArtUrl = imgUrl },
- new Album { Title = "Core", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Stone Temple Pilots"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cornerstone", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Styx"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cosmicolor", Genre = genres["Rap"], Price = 8.99M, Artist = artists["M-Flo"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cross", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Justice"], AlbumArtUrl = imgUrl },
- new Album { Title = "Culture of Fear", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Thievery Corporation"], AlbumArtUrl = imgUrl },
- new Album { Title = "Da Lama Ao Caos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Science & Nação Zumbi"], AlbumArtUrl = imgUrl },
- new Album { Title = "Dakshina", Genre = genres["World"], Price = 8.99M, Artist = artists["Deva Premal"], AlbumArtUrl = imgUrl },
- new Album { Title = "Dark Side of the Moon", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl },
- new Album { Title = "Death Magnetic", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Deep End of Down", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Above the Fold"], AlbumArtUrl = imgUrl },
- new Album { Title = "Deep Purple In Rock", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Deixa Entrar", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Falamansa"], AlbumArtUrl = imgUrl },
- new Album { Title = "Deja Vu", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Crosby, Stills, Nash, and Young"], AlbumArtUrl = imgUrl },
- new Album { Title = "Di Korpu Ku Alma", Genre = genres["World"], Price = 8.99M, Artist = artists["Lura"], AlbumArtUrl = imgUrl },
- new Album { Title = "Diary of a Madman (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Diary of a Madman", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Dirt", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alice in Chains"], AlbumArtUrl = imgUrl },
- new Album { Title = "Diver Down", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Djavan Ao Vivo - Vol. 02", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Djavan"], AlbumArtUrl = imgUrl },
- new Album { Title = "Djavan Ao Vivo - Vol. 1", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Djavan"], AlbumArtUrl = imgUrl },
- new Album { Title = "Drum'n'bass for Papa", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Plug"], AlbumArtUrl = imgUrl },
- new Album { Title = "Duluth", Genre = genres["Country"], Price = 8.99M, Artist = artists["Trampled By Turtles"], AlbumArtUrl = imgUrl },
- new Album { Title = "Dummy", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Portishead"], AlbumArtUrl = imgUrl },
- new Album { Title = "Duos II", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Luciana Souza/Romero Lubambo"], AlbumArtUrl = imgUrl },
- new Album { Title = "Earl Scruggs and Friends", Genre = genres["Country"], Price = 8.99M, Artist = artists["Earl Scruggs"], AlbumArtUrl = imgUrl },
- new Album { Title = "Eden", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "El Camino", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Black Keys"], AlbumArtUrl = imgUrl },
- new Album { Title = "Elegant Gypsy", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Al di Meola"], AlbumArtUrl = imgUrl },
- new Album { Title = "Elements Of Life", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Tiësto"], AlbumArtUrl = imgUrl },
- new Album { Title = "Elis Regina-Minha História", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Elis Regina"], AlbumArtUrl = imgUrl },
- new Album { Title = "Emergency On Planet Earth", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Jamiroquai"], AlbumArtUrl = imgUrl },
- new Album { Title = "Emotion", Genre = genres["World"], Price = 8.99M, Artist = artists["Papa Wemba"], AlbumArtUrl = imgUrl },
- new Album { Title = "English Renaissance", Genre = genres["Classical"], Price = 8.99M, Artist = artists["The King's Singers"], AlbumArtUrl = imgUrl },
- new Album { Title = "Every Kind of Light", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Posies"], AlbumArtUrl = imgUrl },
- new Album { Title = "Faceless", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Godsmack"], AlbumArtUrl = imgUrl },
- new Album { Title = "Facelift", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alice in Chains"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fair Warning", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fear of a Black Planet", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Public Enemy"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fear Of The Dark", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Feels Like Home", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Norah Jones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fireball", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fly", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "For Those About To Rock We Salute You", Genre = genres["Rock"], Price = 8.99M, Artist = artists["AC/DC"], AlbumArtUrl = imgUrl },
- new Album { Title = "Four", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Blues Traveler"], AlbumArtUrl = imgUrl },
- new Album { Title = "Frank", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Amy Winehouse"], AlbumArtUrl = imgUrl },
- new Album { Title = "Further Down the Spiral", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Nine Inch Nails"], AlbumArtUrl = imgUrl },
- new Album { Title = "Garage Inc. (Disc 1)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Garage Inc. (Disc 2)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Garbage", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Garbage"], AlbumArtUrl = imgUrl },
- new Album { Title = "Good News For People Who Love Bad News", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Modest Mouse"], AlbumArtUrl = imgUrl },
- new Album { Title = "Gordon", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Barenaked Ladies"], AlbumArtUrl = imgUrl },
- new Album { Title = "Górecki: Symphony No. 3", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Adrian Leaper & Doreen de Feis"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Duck Sauce"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Lenny Kravitz"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Lenny Kravitz"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Kiss", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Kiss"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greetings from Michigan", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Sufjan Stevens"], AlbumArtUrl = imgUrl },
- new Album { Title = "Group Therapy", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Above & Beyond"], AlbumArtUrl = imgUrl },
- new Album { Title = "Handel: The Messiah (Highlights)", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Scholars Baroque Ensemble"], AlbumArtUrl = imgUrl },
- new Album { Title = "Haydn: Symphonies 99 - 104", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Royal Philharmonic Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Heart of the Night", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Spyro Gyra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Heart On", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Eagles of Death Metal"], AlbumArtUrl = imgUrl },
- new Album { Title = "Holy Diver", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Dio"], AlbumArtUrl = imgUrl },
- new Album { Title = "Homework", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Daft Punk"], AlbumArtUrl = imgUrl },
- new Album { Title = "Hot Rocks, 1964-1971 (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Houses Of The Holy", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "How To Dismantle An Atomic Bomb", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Human", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Projected"], AlbumArtUrl = imgUrl },
- new Album { Title = "Hunky Dory", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Bowie"], AlbumArtUrl = imgUrl },
- new Album { Title = "Hymns", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Projected"], AlbumArtUrl = imgUrl },
- new Album { Title = "Hysteria", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Def Leppard"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Absentia", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Porcupine Tree"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Between", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Paul Van Dyk"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Rainbows", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Radiohead"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Step", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Stevie Ray Vaughan & Double Trouble"], AlbumArtUrl = imgUrl },
- new Album { Title = "In the court of the Crimson King", Genre = genres["Rock"], Price = 8.99M, Artist = artists["King Crimson"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Through The Out Door", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Your Honor [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Your Honor [Disc 2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl },
- new Album { Title = "Indestructible", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rancid"], AlbumArtUrl = imgUrl },
- new Album { Title = "Infinity", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Journey"], AlbumArtUrl = imgUrl },
- new Album { Title = "Into The Light", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Coverdale"], AlbumArtUrl = imgUrl },
- new Album { Title = "Introspective", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Pet Shop Boys"], AlbumArtUrl = imgUrl },
- new Album { Title = "Iron Maiden", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "ISAM", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Amon Tobin"], AlbumArtUrl = imgUrl },
- new Album { Title = "IV", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Jagged Little Pill", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Alanis Morissette"], AlbumArtUrl = imgUrl },
- new Album { Title = "Jagged Little Pill", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alanis Morissette"], AlbumArtUrl = imgUrl },
- new Album { Title = "Jorge Ben Jor 25 Anos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Jorge Ben"], AlbumArtUrl = imgUrl },
- new Album { Title = "Jota Quest-1995", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Jota Quest"], AlbumArtUrl = imgUrl },
- new Album { Title = "Kick", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["INXS"], AlbumArtUrl = imgUrl },
- new Album { Title = "Kill 'Em All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Kind of Blue", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl },
- new Album { Title = "King For A Day Fool For A Lifetime", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Faith No More"], AlbumArtUrl = imgUrl },
- new Album { Title = "Kiss", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Carly Rae Jepsen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Last Call", Genre = genres["Country"], Price = 8.99M, Artist = artists["Cayouche"], AlbumArtUrl = imgUrl },
- new Album { Title = "Le Freak", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Chic"], AlbumArtUrl = imgUrl },
- new Album { Title = "Le Tigre", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Le Tigre"], AlbumArtUrl = imgUrl },
- new Album { Title = "Led Zeppelin I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Led Zeppelin II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Led Zeppelin III", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Let There Be Rock", Genre = genres["Rock"], Price = 8.99M, Artist = artists["AC/DC"], AlbumArtUrl = imgUrl },
- new Album { Title = "Little Earthquakes", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Tori Amos"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live [Disc 1]", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live [Disc 2]", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live After Death", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live At Donington 1992 (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live At Donington 1992 (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live on Earth", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["The Cat Empire"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live On Two Legs [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl },
- new Album { Title = "Living After Midnight", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Judas Priest"], AlbumArtUrl = imgUrl },
- new Album { Title = "Living", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paddy Casey"], AlbumArtUrl = imgUrl },
- new Album { Title = "Load", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Love Changes Everything", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "MacArthur Park Suite", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Donna Summer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Machine Head", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Magical Mystery Tour", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mais Do Mesmo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Legião Urbana"], AlbumArtUrl = imgUrl },
- new Album { Title = "Maquinarama", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Skank"], AlbumArtUrl = imgUrl },
- new Album { Title = "Marasim", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Jagjit Singh"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mascagni: Cavalleria Rusticana", Genre = genres["Classical"], Price = 8.99M, Artist = artists["James Levine"], AlbumArtUrl = imgUrl },
- new Album { Title = "Master of Puppets", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mechanics & Mathematics", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Venus Hum"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mental Jewelry", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Live"], AlbumArtUrl = imgUrl },
- new Album { Title = "Metallics", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "meteora", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Linkin Park"], AlbumArtUrl = imgUrl },
- new Album { Title = "Meus Momentos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Gonzaguinha"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mezmerize", Genre = genres["Metal"], Price = 8.99M, Artist = artists["System Of A Down"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mezzanine", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Massive Attack"], AlbumArtUrl = imgUrl },
- new Album { Title = "Miles Ahead", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl },
- new Album { Title = "Milton Nascimento Ao Vivo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Milton Nascimento"], AlbumArtUrl = imgUrl },
- new Album { Title = "Minas", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Milton Nascimento"], AlbumArtUrl = imgUrl },
- new Album { Title = "Minha Historia", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Buarque"], AlbumArtUrl = imgUrl },
- new Album { Title = "Misplaced Childhood", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Marillion"], AlbumArtUrl = imgUrl },
- new Album { Title = "MK III The Final Concerts [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Morning Dance", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Spyro Gyra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Motley Crue Greatest Hits", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Mötley Crüe"], AlbumArtUrl = imgUrl },
- new Album { Title = "Moving Pictures", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rush"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mozart: Chamber Music", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Nash Ensemble"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mozart: Symphonies Nos. 40 & 41", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Berliner Philharmoniker"], AlbumArtUrl = imgUrl },
- new Album { Title = "Murder Ballads", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Nick Cave and the Bad Seeds"], AlbumArtUrl = imgUrl },
- new Album { Title = "Music For The Jilted Generation", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["The Prodigy"], AlbumArtUrl = imgUrl },
- new Album { Title = "My Generation - The Very Best Of The Who", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Who"], AlbumArtUrl = imgUrl },
- new Album { Title = "My Name is Skrillex", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Skrillex"], AlbumArtUrl = imgUrl },
- new Album { Title = "Na Pista", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cláudio Zoli"], AlbumArtUrl = imgUrl },
- new Album { Title = "Nevermind", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Nirvana"], AlbumArtUrl = imgUrl },
- new Album { Title = "New Adventures In Hi-Fi", Genre = genres["Rock"], Price = 8.99M, Artist = artists["R.E.M."], AlbumArtUrl = imgUrl },
- new Album { Title = "New Divide", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Linkin Park"], AlbumArtUrl = imgUrl },
- new Album { Title = "New York Dolls", Genre = genres["Punk"], Price = 8.99M, Artist = artists["New York Dolls"], AlbumArtUrl = imgUrl },
- new Album { Title = "News Of The World", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Nielsen: The Six Symphonies", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Göteborgs Symfoniker & Neeme Järvi"], AlbumArtUrl = imgUrl },
- new Album { Title = "Night At The Opera", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Night Castle", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Trans-Siberian Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Nkolo", Genre = genres["World"], Price = 8.99M, Artist = artists["Lokua Kanza"], AlbumArtUrl = imgUrl },
- new Album { Title = "No More Tears (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "No Prayer For The Dying", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "No Security", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl },
- new Album { Title = "O Brother, Where Art Thou?", Genre = genres["Country"], Price = 8.99M, Artist = artists["Alison Krauss"], AlbumArtUrl = imgUrl },
- new Album { Title = "O Samba Poconé", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Skank"], AlbumArtUrl = imgUrl },
- new Album { Title = "O(+>", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Prince"], AlbumArtUrl = imgUrl },
- new Album { Title = "Oceania", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Smashing Pumpkins"], AlbumArtUrl = imgUrl },
- new Album { Title = "Off the Deep End", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Weird Al"], AlbumArtUrl = imgUrl },
- new Album { Title = "OK Computer", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Radiohead"], AlbumArtUrl = imgUrl },
- new Album { Title = "Olodum", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Olodum"], AlbumArtUrl = imgUrl },
- new Album { Title = "One Love", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["David Guetta"], AlbumArtUrl = imgUrl },
- new Album { Title = "Operation: Mindcrime", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Queensrÿche"], AlbumArtUrl = imgUrl },
- new Album { Title = "Opiate", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl },
- new Album { Title = "Outbreak", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Dennis Chambers"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pachelbel: Canon & Gigue", Genre = genres["Classical"], Price = 8.99M, Artist = artists["English Concert & Trevor Pinnock"], AlbumArtUrl = imgUrl },
- new Album { Title = "Paid in Full", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Eric B. and Rakim"], AlbumArtUrl = imgUrl },
- new Album { Title = "Para Siempre", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Vicente Fernandez"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pause", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Four Tet"], AlbumArtUrl = imgUrl },
- new Album { Title = "Peace Sells... but Who's Buying", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Megadeth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Physical Graffiti [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Physical Graffiti [Disc 2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Physical Graffiti", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Piece Of Mind", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pinkerton", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Weezer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Plays Metallica By Four Cellos", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Apocalyptica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pop", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Powerslave", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Prenda Minha", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Caetano Veloso"], AlbumArtUrl = imgUrl },
- new Album { Title = "Presence", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pretty Hate Machine", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Nine Inch Nails"], AlbumArtUrl = imgUrl },
- new Album { Title = "Prisoner", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Jezabels"], AlbumArtUrl = imgUrl },
- new Album { Title = "Privateering", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Mark Knopfler"], AlbumArtUrl = imgUrl },
- new Album { Title = "Prokofiev: Romeo & Juliet", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Michael Tilson Thomas"], AlbumArtUrl = imgUrl },
- new Album { Title = "Prokofiev: Symphony No.1", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sergei Prokofiev & Yuri Temirkanov"], AlbumArtUrl = imgUrl },
- new Album { Title = "PSY's Best 6th Part 1", Genre = genres["Pop"], Price = 8.99M, Artist = artists["PSY"], AlbumArtUrl = imgUrl },
- new Album { Title = "Purcell: The Fairy Queen", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Classical Players"], AlbumArtUrl = imgUrl },
- new Album { Title = "Purpendicular", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Purple", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Stone Temple Pilots"], AlbumArtUrl = imgUrl },
- new Album { Title = "Quanta Gente Veio Ver (Live)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Gilberto Gil"], AlbumArtUrl = imgUrl },
- new Album { Title = "Quanta Gente Veio ver--Bônus De Carnaval", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Gilberto Gil"], AlbumArtUrl = imgUrl },
- new Album { Title = "Quiet Songs", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Aisha Duo"], AlbumArtUrl = imgUrl },
- new Album { Title = "Raices", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Los Tigres del Norte"], AlbumArtUrl = imgUrl },
- new Album { Title = "Raising Hell", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Run DMC"], AlbumArtUrl = imgUrl },
- new Album { Title = "Raoul and the Kings of Spain ", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tears For Fears"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rattle And Hum", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Raul Seixas", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Raul Seixas"], AlbumArtUrl = imgUrl },
- new Album { Title = "Recovery [Explicit]", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Eminem"], AlbumArtUrl = imgUrl },
- new Album { Title = "Reign In Blood", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Slayer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Relayed", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Yes"], AlbumArtUrl = imgUrl },
- new Album { Title = "ReLoad", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Respighi:Pines of Rome", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Eugene Ormandy"], AlbumArtUrl = imgUrl },
- new Album { Title = "Restless and Wild", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Accept"], AlbumArtUrl = imgUrl },
- new Album { Title = "Retrospective I (1974-1980)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rush"], AlbumArtUrl = imgUrl },
- new Album { Title = "Revelations", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Audioslave"], AlbumArtUrl = imgUrl },
- new Album { Title = "Revolver", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ride the Lighting ", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ride The Lightning", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ring My Bell", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Anita Ward"], AlbumArtUrl = imgUrl },
- new Album { Title = "Riot Act", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rise of the Phoenix", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Before the Dawn"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rock In Rio [CD1]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rock In Rio [CD2]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rock In Rio [CD2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Roda De Funk", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Funk Como Le Gusta"], AlbumArtUrl = imgUrl },
- new Album { Title = "Room for Squares", Genre = genres["Pop"], Price = 8.99M, Artist = artists["John Mayer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Root Down", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Jimmy Smith"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rounds", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Four Tet"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rubber Factory", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Black Keys"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rust in Peace", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Megadeth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Sambas De Enredo 2001", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl },
- new Album { Title = "Santana - As Years Go By", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl },
- new Album { Title = "Santana Live", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl },
- new Album { Title = "Saturday Night Fever", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Bee Gees"], AlbumArtUrl = imgUrl },
- new Album { Title = "Scary Monsters and Nice Sprites", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Skrillex"], AlbumArtUrl = imgUrl },
- new Album { Title = "Scheherazade", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Chicago Symphony Orchestra & Fritz Reiner"], AlbumArtUrl = imgUrl },
- new Album { Title = "SCRIABIN: Vers la flamme", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Christopher O'Riley"], AlbumArtUrl = imgUrl },
- new Album { Title = "Second Coming", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Stone Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Serie Sem Limite (Disc 1)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Tim Maia"], AlbumArtUrl = imgUrl },
- new Album { Title = "Serie Sem Limite (Disc 2)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Tim Maia"], AlbumArtUrl = imgUrl },
- new Album { Title = "Serious About Men", Genre = genres["Rap"], Price = 8.99M, Artist = artists["The Rubberbandits"], AlbumArtUrl = imgUrl },
- new Album { Title = "Seventh Son of a Seventh Son", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Short Bus", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Filter"], AlbumArtUrl = imgUrl },
- new Album { Title = "Sibelius: Finlandia", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Berliner Philharmoniker"], AlbumArtUrl = imgUrl },
- new Album { Title = "Singles Collection", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Bowie"], AlbumArtUrl = imgUrl },
- new Album { Title = "Six Degrees of Inner Turbulence", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Dream Theater"], AlbumArtUrl = imgUrl },
- new Album { Title = "Slave To The Empire", Genre = genres["Metal"], Price = 8.99M, Artist = artists["T&N"], AlbumArtUrl = imgUrl },
- new Album { Title = "Slaves And Masters", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Slouching Towards Bethlehem", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Robert James"], AlbumArtUrl = imgUrl },
- new Album { Title = "Smash", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Offspring"], AlbumArtUrl = imgUrl },
- new Album { Title = "Something Special", Genre = genres["Country"], Price = 8.99M, Artist = artists["Dolly Parton"], AlbumArtUrl = imgUrl },
- new Album { Title = "Somewhere in Time", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Song(s) You Know By Heart", Genre = genres["Country"], Price = 8.99M, Artist = artists["Jimmy Buffett"], AlbumArtUrl = imgUrl },
- new Album { Title = "Sound of Music", Genre = genres["Punk"], Price = 8.99M, Artist = artists["Adicts"], AlbumArtUrl = imgUrl },
- new Album { Title = "South American Getaway", Genre = genres["Classical"], Price = 8.99M, Artist = artists["The 12 Cellists of The Berlin Philharmonic"], AlbumArtUrl = imgUrl },
- new Album { Title = "Sozinho Remix Ao Vivo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Caetano Veloso"], AlbumArtUrl = imgUrl },
- new Album { Title = "Speak of the Devil", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Spiritual State", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Nujabes"], AlbumArtUrl = imgUrl },
- new Album { Title = "St. Anger", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Still Life", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Opeth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Stop Making Sense", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Talking Heads"], AlbumArtUrl = imgUrl },
- new Album { Title = "Stormbringer", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Stranger than Fiction", Genre = genres["Punk"], Price = 8.99M, Artist = artists["Bad Religion"], AlbumArtUrl = imgUrl },
- new Album { Title = "Strauss: Waltzes", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Eugene Ormandy"], AlbumArtUrl = imgUrl },
- new Album { Title = "Supermodified", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Amon Tobin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Supernatural", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl },
- new Album { Title = "Surfing with the Alien (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Joe Satriani"], AlbumArtUrl = imgUrl },
- new Album { Title = "Switched-On Bach", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Wendy Carlos"], AlbumArtUrl = imgUrl },
- new Album { Title = "Symphony", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Szymanowski: Piano Works, Vol. 1", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Martin Roscoe"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tchaikovsky: The Nutcracker", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Symphony Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ted Nugent", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ted Nugent"], AlbumArtUrl = imgUrl },
- new Album { Title = "Teflon Don", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Rick Ross"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tell Another Joke at the Ol' Choppin' Block", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Danielson Famile"], AlbumArtUrl = imgUrl },
- new Album { Title = "Temple of the Dog", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Temple of the Dog"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ten", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl },
- new Album { Title = "Texas Flood", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Stevie Ray Vaughan"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Battle Rages On", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Beast Live", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paul D'Ianno"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best Of 1980-1990", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best of 1990–2000", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best of Beethoven", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Nicolaus Esterhazy Sinfonia"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best Of Billy Cobham", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Billy Cobham"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best of Ed Motta", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Ed Motta"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best Of Van Halen, Vol. I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Bridge", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Melanie Fiona"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Cage", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tygers of Pan Tang"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Chicago Transit Authority", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Chicago "], AlbumArtUrl = imgUrl },
- new Album { Title = "The Chronic", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Dr. Dre"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Colour And The Shape", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Crane Wife", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["The Decemberists"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Cream Of Clapton", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Cure", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Cure"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Dark Side Of The Moon", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Divine Conspiracy", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Epica"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Doors", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Doors"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Dream of the Blue Turtles", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Sting"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Essential Miles Davis [Disc 1]", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Essential Miles Davis [Disc 2]", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Final Concerts (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Final Frontier", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Head and the Heart", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Head and the Heart"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Joshua Tree", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Last Night of the Proms", Genre = genres["Classical"], Price = 8.99M, Artist = artists["BBC Concert Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Lumineers", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Lumineers"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Number of The Beast", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Number of The Beast", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Police Greatest Hits", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Police"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Song Remains The Same (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Song Remains The Same (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Southern Harmony and Musical Companion", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Spade", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Butch Walker & The Black Widows"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Stone Roses", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Stone Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Suburbs", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Arcade Fire"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Three Tenors Disc1/Disc2", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Carreras, Pavarotti, Domingo"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Trees They Grow So High", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Wall", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl },
- new Album { Title = "The X Factor", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Them Crooked Vultures", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Them Crooked Vultures"], AlbumArtUrl = imgUrl },
- new Album { Title = "This Is Happening", Genre = genres["Rock"], Price = 8.99M, Artist = artists["LCD Soundsystem"], AlbumArtUrl = imgUrl },
- new Album { Title = "Thunder, Lightning, Strike", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Go! Team"], AlbumArtUrl = imgUrl },
- new Album { Title = "Time to Say Goodbye", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Time, Love & Tenderness", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Michael Bolton"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tomorrow Starts Today", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Mobile"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tribute", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tuesday Night Music Club", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Sheryl Crow"], AlbumArtUrl = imgUrl },
- new Album { Title = "Umoja", Genre = genres["Rock"], Price = 8.99M, Artist = artists["BLØF"], AlbumArtUrl = imgUrl },
- new Album { Title = "Under the Pink", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Tori Amos"], AlbumArtUrl = imgUrl },
- new Album { Title = "Undertow", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl },
- new Album { Title = "Un-Led-Ed", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Dread Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Unplugged [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Kiss"], AlbumArtUrl = imgUrl },
- new Album { Title = "Unplugged", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl },
- new Album { Title = "Unplugged", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl },
- new Album { Title = "Untrue", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Burial"], AlbumArtUrl = imgUrl },
- new Album { Title = "Use Your Illusion I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Use Your Illusion II", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Use Your Illusion II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Van Halen III", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Van Halen", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Version 2.0", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Garbage"], AlbumArtUrl = imgUrl },
- new Album { Title = "Vinicius De Moraes", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Vinícius De Moraes"], AlbumArtUrl = imgUrl },
- new Album { Title = "Virtual XI", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Voodoo Lounge", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Vozes do MPB", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl },
- new Album { Title = "Vs.", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl },
- new Album { Title = "Wagner: Favourite Overtures", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sir Georg Solti & Wiener Philharmoniker"], AlbumArtUrl = imgUrl },
- new Album { Title = "Walking Into Clarksdale", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Page & Plant"], AlbumArtUrl = imgUrl },
- new Album { Title = "Wapi Yo", Genre = genres["World"], Price = 8.99M, Artist = artists["Lokua Kanza"], AlbumArtUrl = imgUrl },
- new Album { Title = "War", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Warner 25 Anos", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Antônio Carlos Jobim"], AlbumArtUrl = imgUrl },
- new Album { Title = "Wasteland R&Btheque", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Raunchy"], AlbumArtUrl = imgUrl },
- new Album { Title = "Watermark", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Enya"], AlbumArtUrl = imgUrl },
- new Album { Title = "We Were Exploding Anyway", Genre = genres["Rock"], Price = 8.99M, Artist = artists["65daysofstatic"], AlbumArtUrl = imgUrl },
- new Album { Title = "Weill: The Seven Deadly Sins", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Orchestre de l'Opéra de Lyon"], AlbumArtUrl = imgUrl },
- new Album { Title = "White Pony", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deftones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Who's Next", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Who"], AlbumArtUrl = imgUrl },
- new Album { Title = "Wish You Were Here", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl },
- new Album { Title = "With Oden on Our Side", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Amon Amarth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Worlds", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Aaron Goldberg"], AlbumArtUrl = imgUrl },
- new Album { Title = "Worship Music", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Anthrax"], AlbumArtUrl = imgUrl },
- new Album { Title = "X&Y", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Coldplay"], AlbumArtUrl = imgUrl },
- new Album { Title = "Xinti", Genre = genres["World"], Price = 8.99M, Artist = artists["Sara Tavares"], AlbumArtUrl = imgUrl },
- new Album { Title = "Yano", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Yano"], AlbumArtUrl = imgUrl },
- new Album { Title = "Yesterday Once More Disc 1/Disc 2", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Carpenters"], AlbumArtUrl = imgUrl },
- new Album { Title = "Zooropa", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Zoso", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- };
-
- foreach (var album in albums)
- {
- album.ArtistId = album.Artist.ArtistId;
- album.GenreId = album.Genre.GenreId;
- }
-
- return albums;
- }
-
- private static Dictionary artists;
- public static Dictionary Artists
- {
- get
- {
- if (artists == null)
- {
- var artistsList = new Artist[]
- {
- new Artist { Name = "65daysofstatic" },
- new Artist { Name = "Aaron Goldberg" },
- new Artist { Name = "Above & Beyond" },
- new Artist { Name = "Above the Fold" },
- new Artist { Name = "AC/DC" },
- new Artist { Name = "Accept" },
- new Artist { Name = "Adicts" },
- new Artist { Name = "Adrian Leaper & Doreen de Feis" },
- new Artist { Name = "Aerosmith" },
- new Artist { Name = "Aisha Duo" },
- new Artist { Name = "Al di Meola" },
- new Artist { Name = "Alabama Shakes" },
- new Artist { Name = "Alanis Morissette" },
- new Artist { Name = "Alberto Turco & Nova Schola Gregoriana" },
- new Artist { Name = "Alice in Chains" },
- new Artist { Name = "Alison Krauss" },
- new Artist { Name = "Amon Amarth" },
- new Artist { Name = "Amon Tobin" },
- new Artist { Name = "Amr Diab" },
- new Artist { Name = "Amy Winehouse" },
- new Artist { Name = "Anita Ward" },
- new Artist { Name = "Anthrax" },
- new Artist { Name = "Antônio Carlos Jobim" },
- new Artist { Name = "Apocalyptica" },
- new Artist { Name = "Aqua" },
- new Artist { Name = "Armand Van Helden" },
- new Artist { Name = "Arcade Fire" },
- new Artist { Name = "Audioslave" },
- new Artist { Name = "Bad Religion" },
- new Artist { Name = "Barenaked Ladies" },
- new Artist { Name = "BBC Concert Orchestra" },
- new Artist { Name = "Bee Gees" },
- new Artist { Name = "Before the Dawn" },
- new Artist { Name = "Berliner Philharmoniker" },
- new Artist { Name = "Billy Cobham" },
- new Artist { Name = "Black Label Society" },
- new Artist { Name = "Black Sabbath" },
- new Artist { Name = "BLØF" },
- new Artist { Name = "Blues Traveler" },
- new Artist { Name = "Boston Symphony Orchestra & Seiji Ozawa" },
- new Artist { Name = "Britten Sinfonia, Ivor Bolton & Lesley Garrett" },
- new Artist { Name = "Bruce Dickinson" },
- new Artist { Name = "Buddy Guy" },
- new Artist { Name = "Burial" },
- new Artist { Name = "Butch Walker & The Black Widows" },
- new Artist { Name = "Caetano Veloso" },
- new Artist { Name = "Cake" },
- new Artist { Name = "Calexico" },
- new Artist { Name = "Carly Rae Jepsen" },
- new Artist { Name = "Carreras, Pavarotti, Domingo" },
- new Artist { Name = "Cássia Eller" },
- new Artist { Name = "Cayouche" },
- new Artist { Name = "Chic" },
- new Artist { Name = "Chicago " },
- new Artist { Name = "Chicago Symphony Orchestra & Fritz Reiner" },
- new Artist { Name = "Chico Buarque" },
- new Artist { Name = "Chico Science & Nação Zumbi" },
- new Artist { Name = "Choir Of Westminster Abbey & Simon Preston" },
- new Artist { Name = "Chris Cornell" },
- new Artist { Name = "Christopher O'Riley" },
- new Artist { Name = "Cidade Negra" },
- new Artist { Name = "Cláudio Zoli" },
- new Artist { Name = "Coldplay" },
- new Artist { Name = "Creedence Clearwater Revival" },
- new Artist { Name = "Crosby, Stills, Nash, and Young" },
- new Artist { Name = "Daft Punk" },
- new Artist { Name = "Danielson Famile" },
- new Artist { Name = "David Bowie" },
- new Artist { Name = "David Coverdale" },
- new Artist { Name = "David Guetta" },
- new Artist { Name = "deadmau5" },
- new Artist { Name = "Deep Purple" },
- new Artist { Name = "Def Leppard" },
- new Artist { Name = "Deftones" },
- new Artist { Name = "Dennis Chambers" },
- new Artist { Name = "Deva Premal" },
- new Artist { Name = "Dio" },
- new Artist { Name = "Djavan" },
- new Artist { Name = "Dolly Parton" },
- new Artist { Name = "Donna Summer" },
- new Artist { Name = "Dr. Dre" },
- new Artist { Name = "Dread Zeppelin" },
- new Artist { Name = "Dream Theater" },
- new Artist { Name = "Duck Sauce" },
- new Artist { Name = "Earl Scruggs" },
- new Artist { Name = "Ed Motta" },
- new Artist { Name = "Edo de Waart & San Francisco Symphony" },
- new Artist { Name = "Elis Regina" },
- new Artist { Name = "Eminem" },
- new Artist { Name = "English Concert & Trevor Pinnock" },
- new Artist { Name = "Enya" },
- new Artist { Name = "Epica" },
- new Artist { Name = "Eric B. and Rakim" },
- new Artist { Name = "Eric Clapton" },
- new Artist { Name = "Eugene Ormandy" },
- new Artist { Name = "Faith No More" },
- new Artist { Name = "Falamansa" },
- new Artist { Name = "Filter" },
- new Artist { Name = "Foo Fighters" },
- new Artist { Name = "Four Tet" },
- new Artist { Name = "Frank Zappa & Captain Beefheart" },
- new Artist { Name = "Fretwork" },
- new Artist { Name = "Funk Como Le Gusta" },
- new Artist { Name = "Garbage" },
- new Artist { Name = "Gerald Moore" },
- new Artist { Name = "Gilberto Gil" },
- new Artist { Name = "Godsmack" },
- new Artist { Name = "Gonzaguinha" },
- new Artist { Name = "Göteborgs Symfoniker & Neeme Järvi" },
- new Artist { Name = "Guns N' Roses" },
- new Artist { Name = "Gustav Mahler" },
- new Artist { Name = "In This Moment" },
- new Artist { Name = "Incognito" },
- new Artist { Name = "INXS" },
- new Artist { Name = "Iron Maiden" },
- new Artist { Name = "Jagjit Singh" },
- new Artist { Name = "James Levine" },
- new Artist { Name = "Jamiroquai" },
- new Artist { Name = "Jimi Hendrix" },
- new Artist { Name = "Jimmy Buffett" },
- new Artist { Name = "Jimmy Smith" },
- new Artist { Name = "Joe Satriani" },
- new Artist { Name = "John Digweed" },
- new Artist { Name = "John Mayer" },
- new Artist { Name = "Jorge Ben" },
- new Artist { Name = "Jota Quest" },
- new Artist { Name = "Journey" },
- new Artist { Name = "Judas Priest" },
- new Artist { Name = "Julian Bream" },
- new Artist { Name = "Justice" },
- new Artist { Name = "Orchestre de l'Opéra de Lyon" },
- new Artist { Name = "King Crimson" },
- new Artist { Name = "Kiss" },
- new Artist { Name = "LCD Soundsystem" },
- new Artist { Name = "Le Tigre" },
- new Artist { Name = "Led Zeppelin" },
- new Artist { Name = "Legião Urbana" },
- new Artist { Name = "Lenny Kravitz" },
- new Artist { Name = "Les Arts Florissants & William Christie" },
- new Artist { Name = "Limp Bizkit" },
- new Artist { Name = "Linkin Park" },
- new Artist { Name = "Live" },
- new Artist { Name = "Lokua Kanza" },
- new Artist { Name = "London Symphony Orchestra" },
- new Artist { Name = "Los Tigres del Norte" },
- new Artist { Name = "Luciana Souza/Romero Lubambo" },
- new Artist { Name = "Lulu Santos" },
- new Artist { Name = "Lura" },
- new Artist { Name = "Marcos Valle" },
- new Artist { Name = "Marillion" },
- new Artist { Name = "Marisa Monte" },
- new Artist { Name = "Mark Knopfler" },
- new Artist { Name = "Martin Roscoe" },
- new Artist { Name = "Massive Attack" },
- new Artist { Name = "Maurizio Pollini" },
- new Artist { Name = "Megadeth" },
- new Artist { Name = "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" },
- new Artist { Name = "Melanie Fiona" },
- new Artist { Name = "Men At Work" },
- new Artist { Name = "Metallica" },
- new Artist { Name = "M-Flo" },
- new Artist { Name = "Michael Bolton" },
- new Artist { Name = "Michael Tilson Thomas" },
- new Artist { Name = "Miles Davis" },
- new Artist { Name = "Milton Nascimento" },
- new Artist { Name = "Mobile" },
- new Artist { Name = "Modest Mouse" },
- new Artist { Name = "Mötley Crüe" },
- new Artist { Name = "Motörhead" },
- new Artist { Name = "Mumford & Sons" },
- new Artist { Name = "Munkle" },
- new Artist { Name = "Nash Ensemble" },
- new Artist { Name = "Neil Young" },
- new Artist { Name = "New York Dolls" },
- new Artist { Name = "Nick Cave and the Bad Seeds" },
- new Artist { Name = "Nicolaus Esterhazy Sinfonia" },
- new Artist { Name = "Nine Inch Nails" },
- new Artist { Name = "Nirvana" },
- new Artist { Name = "Norah Jones" },
- new Artist { Name = "Nujabes" },
- new Artist { Name = "O Terço" },
- new Artist { Name = "Oasis" },
- new Artist { Name = "Olodum" },
- new Artist { Name = "Opeth" },
- new Artist { Name = "Orchestra of The Age of Enlightenment" },
- new Artist { Name = "Os Paralamas Do Sucesso" },
- new Artist { Name = "Ozzy Osbourne" },
- new Artist { Name = "Paddy Casey" },
- new Artist { Name = "Page & Plant" },
- new Artist { Name = "Papa Wemba" },
- new Artist { Name = "Paul D'Ianno" },
- new Artist { Name = "Paul Oakenfold" },
- new Artist { Name = "Paul Van Dyk" },
- new Artist { Name = "Pearl Jam" },
- new Artist { Name = "Pet Shop Boys" },
- new Artist { Name = "Pink Floyd" },
- new Artist { Name = "Plug" },
- new Artist { Name = "Porcupine Tree" },
- new Artist { Name = "Portishead" },
- new Artist { Name = "Prince" },
- new Artist { Name = "Projected" },
- new Artist { Name = "PSY" },
- new Artist { Name = "Public Enemy" },
- new Artist { Name = "Queen" },
- new Artist { Name = "Queensrÿche" },
- new Artist { Name = "R.E.M." },
- new Artist { Name = "Radiohead" },
- new Artist { Name = "Rancid" },
- new Artist { Name = "Raul Seixas" },
- new Artist { Name = "Raunchy" },
- new Artist { Name = "Red Hot Chili Peppers" },
- new Artist { Name = "Rick Ross" },
- new Artist { Name = "Robert James" },
- new Artist { Name = "London Classical Players" },
- new Artist { Name = "Royal Philharmonic Orchestra" },
- new Artist { Name = "Run DMC" },
- new Artist { Name = "Rush" },
- new Artist { Name = "Santana" },
- new Artist { Name = "Sara Tavares" },
- new Artist { Name = "Sarah Brightman" },
- new Artist { Name = "Sasha" },
- new Artist { Name = "Scholars Baroque Ensemble" },
- new Artist { Name = "Scorpions" },
- new Artist { Name = "Sergei Prokofiev & Yuri Temirkanov" },
- new Artist { Name = "Sheryl Crow" },
- new Artist { Name = "Sir Georg Solti & Wiener Philharmoniker" },
- new Artist { Name = "Skank" },
- new Artist { Name = "Skrillex" },
- new Artist { Name = "Slash" },
- new Artist { Name = "Slayer" },
- new Artist { Name = "Soul-Junk" },
- new Artist { Name = "Soundgarden" },
- new Artist { Name = "Spyro Gyra" },
- new Artist { Name = "Stevie Ray Vaughan & Double Trouble" },
- new Artist { Name = "Stevie Ray Vaughan" },
- new Artist { Name = "Sting" },
- new Artist { Name = "Stone Temple Pilots" },
- new Artist { Name = "Styx" },
- new Artist { Name = "Sufjan Stevens" },
- new Artist { Name = "Supreme Beings of Leisure" },
- new Artist { Name = "System Of A Down" },
- new Artist { Name = "T&N" },
- new Artist { Name = "Talking Heads" },
- new Artist { Name = "Tears For Fears" },
- new Artist { Name = "Ted Nugent" },
- new Artist { Name = "Temple of the Dog" },
- new Artist { Name = "Terry Bozzio, Tony Levin & Steve Stevens" },
- new Artist { Name = "The 12 Cellists of The Berlin Philharmonic" },
- new Artist { Name = "The Axis of Awesome" },
- new Artist { Name = "The Beatles" },
- new Artist { Name = "The Black Crowes" },
- new Artist { Name = "The Black Keys" },
- new Artist { Name = "The Carpenters" },
- new Artist { Name = "The Cat Empire" },
- new Artist { Name = "The Cult" },
- new Artist { Name = "The Cure" },
- new Artist { Name = "The Decemberists" },
- new Artist { Name = "The Doors" },
- new Artist { Name = "The Eagles of Death Metal" },
- new Artist { Name = "The Go! Team" },
- new Artist { Name = "The Head and the Heart" },
- new Artist { Name = "The Jezabels" },
- new Artist { Name = "The King's Singers" },
- new Artist { Name = "The Lumineers" },
- new Artist { Name = "The Offspring" },
- new Artist { Name = "The Police" },
- new Artist { Name = "The Posies" },
- new Artist { Name = "The Prodigy" },
- new Artist { Name = "The Rolling Stones" },
- new Artist { Name = "The Rubberbandits" },
- new Artist { Name = "The Smashing Pumpkins" },
- new Artist { Name = "The Stone Roses" },
- new Artist { Name = "The Who" },
- new Artist { Name = "Them Crooked Vultures" },
- new Artist { Name = "TheStart" },
- new Artist { Name = "Thievery Corporation" },
- new Artist { Name = "Tiësto" },
- new Artist { Name = "Tim Maia" },
- new Artist { Name = "Ton Koopman" },
- new Artist { Name = "Tool" },
- new Artist { Name = "Tori Amos" },
- new Artist { Name = "Trampled By Turtles" },
- new Artist { Name = "Trans-Siberian Orchestra" },
- new Artist { Name = "Tygers of Pan Tang" },
- new Artist { Name = "U2" },
- new Artist { Name = "UB40" },
- new Artist { Name = "Uh Huh Her " },
- new Artist { Name = "Van Halen" },
- new Artist { Name = "Various Artists" },
- new Artist { Name = "Velvet Revolver" },
- new Artist { Name = "Venus Hum" },
- new Artist { Name = "Vicente Fernandez" },
- new Artist { Name = "Vinícius De Moraes" },
- new Artist { Name = "Weezer" },
- new Artist { Name = "Weird Al" },
- new Artist { Name = "Wendy Carlos" },
- new Artist { Name = "Wilhelm Kempff" },
- new Artist { Name = "Yano" },
- new Artist { Name = "Yehudi Menuhin" },
- new Artist { Name = "Yes" },
- new Artist { Name = "Yo-Yo Ma" },
- new Artist { Name = "Zeca Pagodinho" },
- new Artist { Name = "אריק אינשטיין"}
- };
-
- // TODO [EF] Swap to store generated keys when available
- int artistId = 1;
- artists = new Dictionary();
- foreach (Artist artist in artistsList)
- {
- artist.ArtistId = artistId++;
- artists.Add(artist.Name, artist);
- }
- }
-
- return artists;
- }
- }
-
- private static Dictionary genres;
- public static Dictionary Genres
- {
- get
- {
- if (genres == null)
- {
- var genresList = new Genre[]
- {
- new Genre { Name = "Pop" },
- new Genre { Name = "Rock" },
- new Genre { Name = "Jazz" },
- new Genre { Name = "Metal" },
- new Genre { Name = "Electronic" },
- new Genre { Name = "Blues" },
- new Genre { Name = "Latin" },
- new Genre { Name = "Rap" },
- new Genre { Name = "Classical" },
- new Genre { Name = "Alternative" },
- new Genre { Name = "Country" },
- new Genre { Name = "R&B" },
- new Genre { Name = "Indie" },
- new Genre { Name = "Punk" },
- new Genre { Name = "World" }
- };
-
- genres = new Dictionary();
- // TODO [EF] Swap to store generated keys when available
- int genreId = 1;
- foreach (Genre genre in genresList)
- {
- genre.GenreId = genreId++;
-
- // TODO [EF] Remove when null values are supported by update pipeline
- genre.Description = genre.Name + " is great music (if you like it).";
-
- genres.Add(genre.Name, genre);
- }
- }
-
- return genres;
- }
- }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs b/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs
deleted file mode 100644
index 8167ec3d..00000000
--- a/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System.Linq;
-using System.Text.RegularExpressions;
-
-namespace MusicStore.Models
-{
- // Obviously this is not a serious sentiment analyser. It is only here to provide an amusing demonstration of cross-property
- // validation in AlbumsApiController.
- public static class SentimentAnalysis
- {
- private static string[] positiveSentimentWords = new[] { "happy", "fun", "joy", "love", "delight", "bunny", "bunnies", "asp.net" };
-
- private static string[] negativeSentimentWords = new[] { "sad", "pain", "despair", "hate", "scorn", "death", "package management" };
-
- public static SentimentResult GetSentiment(string text) {
- var numPositiveWords = CountWordOccurrences(text, positiveSentimentWords);
- var numNegativeWords = CountWordOccurrences(text, negativeSentimentWords);
- if (numPositiveWords > numNegativeWords) {
- return SentimentResult.Positive;
- } else if (numNegativeWords > numPositiveWords) {
- return SentimentResult.Negative;
- } else {
- return SentimentResult.Neutral;
- }
- }
-
- private static int CountWordOccurrences(string text, string[] words)
- {
- // Very simplistic matching technique for this sample. Not scalable and not really even correct.
- return new Regex(string.Join("|", words), RegexOptions.IgnoreCase).Matches(text).Count;
- }
-
- public enum SentimentResult {
- Negative,
- Neutral,
- Positive,
- }
- }
-}
diff --git a/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs b/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs
deleted file mode 100644
index 1d2465ab..00000000
--- a/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-using Microsoft.AspNetCore.Http;
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace MusicStore.Models
-{
- public partial class ShoppingCart
- {
- MusicStoreContext _db;
- string ShoppingCartId { get; set; }
-
- public ShoppingCart(MusicStoreContext db)
- {
- _db = db;
- }
-
- public static ShoppingCart GetCart(MusicStoreContext db, HttpContext context)
- {
- var cart = new ShoppingCart(db);
- cart.ShoppingCartId = cart.GetCartId(context);
- return cart;
- }
-
- public void AddToCart(Album album)
- {
- // Get the matching cart and album instances
- var cartItem = _db.CartItems.SingleOrDefault(
- c => c.CartId == ShoppingCartId
- && c.AlbumId == album.AlbumId);
-
- if (cartItem == null)
- {
- // TODO [EF] Swap to store generated key once we support identity pattern
- var nextCartItemId = _db.CartItems.Any()
- ? _db.CartItems.Max(c => c.CartItemId) + 1
- : 1;
-
- // Create a new cart item if no cart item exists
- cartItem = new CartItem
- {
- CartItemId = nextCartItemId,
- AlbumId = album.AlbumId,
- CartId = ShoppingCartId,
- Count = 1,
- DateCreated = DateTime.Now
- };
-
- _db.CartItems.Add(cartItem);
- }
- else
- {
- // If the item does exist in the cart, then add one to the quantity
- cartItem.Count++;
-
- // TODO [EF] Remove this line once change detection is available
- _db.Update(cartItem);
- }
- }
-
- public int RemoveFromCart(int id)
- {
- // Get the cart
- var cartItem = _db.CartItems.Single(
- cart => cart.CartId == ShoppingCartId
- && cart.CartItemId == id);
-
- int itemCount = 0;
-
- if (cartItem != null)
- {
- if (cartItem.Count > 1)
- {
- cartItem.Count--;
-
- // TODO [EF] Remove this line once change detection is available
- _db.Update(cartItem);
-
- itemCount = cartItem.Count;
- }
- else
- {
- _db.CartItems.Remove(cartItem);
- }
- }
-
- return itemCount;
- }
-
- public void EmptyCart()
- {
- var cartItems = _db.CartItems.Where(cart => cart.CartId == ShoppingCartId);
-
- foreach (var cartItem in cartItems)
- {
- _db.Remove(cartItem);
- }
- }
-
- public List GetCartItems()
- {
- var cartItems = _db.CartItems.Where(cart => cart.CartId == ShoppingCartId).ToList();
- //TODO: Auto population of the related album data not available until EF feature is lighted up.
- foreach (var cartItem in cartItems)
- {
- cartItem.Album = _db.Albums.Single(a => a.AlbumId == cartItem.AlbumId);
- }
-
- return cartItems;
- }
-
- public int GetCount()
- {
- // Get the count of each item in the cart and sum them up
- int? count = (from cartItems in _db.CartItems
- where cartItems.CartId == ShoppingCartId
- select (int?)cartItems.Count).Sum();
-
- // Return 0 if all entries are null
- return count ?? 0;
- }
-
- public decimal GetTotal()
- {
- // Multiply album price by count of that album to get
- // the current price for each of those albums in the cart
- // sum all album price totals to get the cart total
-
- // TODO Collapse to a single query once EF supports querying related data
- decimal total = 0;
- foreach (var item in _db.CartItems.Where(c => c.CartId == ShoppingCartId))
- {
- var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId);
- total += item.Count * album.Price;
- }
-
- return total;
- }
-
- public int CreateOrder(Order order)
- {
- decimal orderTotal = 0;
-
- var cartItems = GetCartItems();
-
- // TODO [EF] Swap to store generated identity key when supported
- var nextId = _db.OrderDetails.Any()
- ? _db.OrderDetails.Max(o => o.OrderDetailId) + 1
- : 1;
-
- // Iterate over the items in the cart, adding the order details for each
- foreach (var item in cartItems)
- {
- //var album = _db.Albums.Find(item.AlbumId);
- var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId);
-
- var orderDetail = new OrderDetail
- {
- OrderDetailId = nextId,
- AlbumId = item.AlbumId,
- OrderId = order.OrderId,
- UnitPrice = album.Price,
- Quantity = item.Count,
- };
-
- // Set the order total of the shopping cart
- orderTotal += (item.Count * album.Price);
-
- _db.OrderDetails.Add(orderDetail);
-
- nextId++;
- }
-
- // Set the order's total to the orderTotal count
- order.Total = orderTotal;
-
- // Empty the shopping cart
- EmptyCart();
-
- // Return the OrderId as the confirmation number
- return order.OrderId;
- }
-
- // We're using HttpContextBase to allow access to cookies.
- public string GetCartId(HttpContext context)
- {
- var sessionCookie = context.Request.Cookies["Session"];
- string cartId = null;
-
- if (string.IsNullOrWhiteSpace(sessionCookie))
- {
- //A GUID to hold the cartId.
- cartId = Guid.NewGuid().ToString();
-
- // Send cart Id as a cookie to the client.
- context.Response.Cookies.Append("Session", cartId);
- }
- else
- {
- cartId = sessionCookie;
- }
-
- return cartId;
- }
- }
-}
diff --git a/samples/angular/MusicStore/Controllers/HomeController.cs b/samples/angular/MusicStore/Controllers/HomeController.cs
deleted file mode 100755
index 07e97022..00000000
--- a/samples/angular/MusicStore/Controllers/HomeController.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-
-namespace MusicStore.Controllers
-{
- public class HomeController : Controller
- {
- public IActionResult Index()
- {
- return View();
- }
-
- public IActionResult Error()
- {
- return View("~/Views/Shared/Error.cshtml");
- }
- }
-}
diff --git a/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs b/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs
deleted file mode 100644
index 856023a8..00000000
--- a/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using System;
-using Microsoft.AspNetCore.Mvc.Filters;
-
-namespace MusicStore.Infrastructure
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
- public sealed class NoCacheAttribute : ActionFilterAttribute
- {
- public override void OnResultExecuting(ResultExecutingContext context)
- {
- context.HttpContext.Response.Headers["Cache-Control"] = "no-cache, no-store, max-age=0";
- context.HttpContext.Response.Headers["Pragma"] = "no-cache";
- context.HttpContext.Response.Headers["Expires"] = "-1";
-
- base.OnResultExecuting(context);
- }
- }
-}
diff --git a/samples/angular/MusicStore/Infrastructure/PagedList.cs b/samples/angular/MusicStore/Infrastructure/PagedList.cs
deleted file mode 100644
index b2cb2c57..00000000
--- a/samples/angular/MusicStore/Infrastructure/PagedList.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-
-namespace MusicStore.Infrastructure
-{
- public interface IPagedList
- {
- IEnumerable Data { get; }
-
- int Page { get; }
-
- int PageSize { get; }
-
- int TotalCount { get; }
- }
-
- internal class PagedList : IPagedList
- {
- public PagedList(IEnumerable data, int page, int pageSize, int totalCount)
- {
- Data = data;
- Page = page;
- PageSize = pageSize;
- TotalCount = totalCount;
- }
-
- public IEnumerable Data { get; private set; }
-
- public int Page { get; private set; }
-
- public int PageSize { get; private set; }
-
- public int TotalCount { get; private set; }
- }
-
- public static class PagedListExtensions
- {
- public static IPagedList ToPagedList(this IQueryable query, int page, int pageSize)
- {
- if (query == null)
- {
- throw new ArgumentNullException("query");
- }
-
- var pagingConfig = new PagingConfig(page, pageSize);
- var skipCount = ValidatePagePropertiesAndGetSkipCount(pagingConfig);
-
- var data = query
- .Skip(skipCount)
- .Take(pagingConfig.PageSize)
- .ToList();
-
- if (skipCount > 0 && data.Count == 0)
- {
- // Requested page has no records, just return the first page
- pagingConfig.Page = 1;
- data = query
- .Take(pagingConfig.PageSize)
- .ToList();
- }
-
- return new PagedList(data, pagingConfig.Page, pagingConfig.PageSize, query.Count());
- }
-
- public static Task> ToPagedListAsync(this IQueryable query, int page, int pageSize, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection = SortDirection.Ascending)
- where TModel : class
- {
- return ToPagedListAsync(query, page, pageSize, sortExpression, defaultSortExpression, defaultSortDirection, null);
- }
-
- public static async Task> ToPagedListAsync(this IQueryable query, int page, int pageSize, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection, Func selector)
- where TModel : class
- where TResult : class
- {
- if (query == null)
- {
- throw new ArgumentNullException("query");
- }
-
- var pagingConfig = new PagingConfig(page, pageSize);
- var skipCount = ValidatePagePropertiesAndGetSkipCount(pagingConfig);
- var dataQuery = query;
-
- if (defaultSortExpression != null)
- {
- dataQuery = dataQuery
- .SortBy(sortExpression, defaultSortExpression);
- }
-
- var data = await dataQuery
- .Skip(skipCount)
- .Take(pagingConfig.PageSize)
- .ToListAsync();
-
- if (skipCount > 0 && data.Count == 0)
- {
- // Requested page has no records, just return the first page
- pagingConfig.Page = 1;
- data = await dataQuery
- .Take(pagingConfig.PageSize)
- .ToListAsync();
- }
-
- var count = await query.CountAsync();
-
- var resultData = selector != null
- ? data.Select(selector)
- : data.Cast();
-
- return new PagedList(resultData, pagingConfig.Page, pagingConfig.PageSize, count);
- }
-
- private static int ValidatePagePropertiesAndGetSkipCount(PagingConfig pagingConfig)
- {
- if (pagingConfig.Page < 1)
- {
- pagingConfig.Page = 1;
- }
-
- if (pagingConfig.PageSize < 10)
- {
- pagingConfig.PageSize = 10;
- }
-
- if (pagingConfig.PageSize > 100)
- {
- pagingConfig.PageSize = 100;
- }
-
- return pagingConfig.PageSize * (pagingConfig.Page - 1);
- }
-
- internal class PagingConfig
- {
- public PagingConfig(int page, int pageSize)
- {
- Page = page;
- PageSize = pageSize;
- }
-
- public int Page { get; set; }
-
- public int PageSize { get; set; }
- }
- }
-}
diff --git a/samples/angular/MusicStore/Infrastructure/SortDirection.cs b/samples/angular/MusicStore/Infrastructure/SortDirection.cs
deleted file mode 100644
index 28f7e86c..00000000
--- a/samples/angular/MusicStore/Infrastructure/SortDirection.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace MusicStore.Infrastructure
-{
- public enum SortDirection
- {
- Ascending,
- Descending
- }
-}
diff --git a/samples/angular/MusicStore/Infrastructure/SortExpression.cs b/samples/angular/MusicStore/Infrastructure/SortExpression.cs
deleted file mode 100644
index 88ba312c..00000000
--- a/samples/angular/MusicStore/Infrastructure/SortExpression.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal;
-
-namespace MusicStore.Infrastructure
-{
- public static class SortExpression
- {
- private const string SORT_DIRECTION_DESC = " DESC";
-
- public static IQueryable SortBy(this IQueryable query, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection = SortDirection.Ascending) where TModel : class
- {
- return SortBy(query, sortExpression ?? Create(defaultSortExpression, defaultSortDirection));
- }
-
- public static string Create(Expression> expression, SortDirection sortDirection = SortDirection.Ascending) where TModel : class
- {
- var expressionText = ExpressionHelper.GetExpressionText(expression);
- // TODO: Validate the expression depth, etc.
-
- var sortExpression = expressionText;
-
- if (sortDirection == SortDirection.Descending)
- {
- sortExpression += SORT_DIRECTION_DESC;
- }
-
- return sortExpression;
- }
-
- public static IQueryable SortBy(this IQueryable source, string sortExpression) where T : class
- {
- if (source == null)
- {
- throw new ArgumentNullException("source");
- }
-
- if (String.IsNullOrWhiteSpace(sortExpression))
- {
- return source;
- }
-
- sortExpression = sortExpression.Trim();
- var isDescending = false;
-
- // DataSource control passes the sort parameter with a direction
- // if the direction is descending
- if (sortExpression.EndsWith(SORT_DIRECTION_DESC, StringComparison.OrdinalIgnoreCase))
- {
- isDescending = true;
- var descIndex = sortExpression.Length - SORT_DIRECTION_DESC.Length;
- sortExpression = sortExpression.Substring(0, descIndex).Trim();
- }
-
- if (string.IsNullOrEmpty(sortExpression))
- {
- return source;
- }
-
- ParameterExpression parameter = Expression.Parameter(source.ElementType, String.Empty);
-
- // Build up the property expression, e.g.: (m => m.Foo.Bar)
- var sortExpressionParts = sortExpression.Split('.');
- Expression propertyExpression = parameter;
- foreach (var property in sortExpressionParts)
- {
- propertyExpression = Expression.Property(propertyExpression, property);
- }
-
- LambdaExpression lambda = Expression.Lambda(propertyExpression, parameter);
-
- var methodName = (isDescending) ? "OrderByDescending" : "OrderBy";
-
- Expression methodCallExpression = Expression.Call(
- typeof(Queryable),
- methodName,
- new[] { source.ElementType, propertyExpression.Type },
- source.Expression,
- Expression.Quote(lambda));
-
- return (IQueryable)source.Provider.CreateQuery(methodCallExpression);
- }
- }
-}
diff --git a/samples/angular/MusicStore/MusicStore.xproj b/samples/angular/MusicStore/MusicStore.xproj
deleted file mode 100644
index 93efb5ea..00000000
--- a/samples/angular/MusicStore/MusicStore.xproj
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- 14.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- true
-
-
-
- 1a74148f-9dc0-435d-b5ac-7d1b0d3d5e0b
- MusicStore
- ..\artifacts\obj\$(MSBuildProjectName)
- .\bin\
-
-
- 2.0
- 5068
-
-
-
\ No newline at end of file
diff --git a/samples/angular/MusicStore/Startup.cs b/samples/angular/MusicStore/Startup.cs
deleted file mode 100755
index c4e37bff..00000000
--- a/samples/angular/MusicStore/Startup.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Logging;
-using Microsoft.Extensions.PlatformAbstractions;
-using AutoMapper;
-using MusicStore.Apis;
-using MusicStore.Models;
-
-namespace MusicStore
-{
- public class Startup
- {
- // This method gets called by the runtime. Use this method to add services to the container.
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddMvc().AddJsonOptions(options =>
- {
- options.SerializerSettings.ContractResolver = null;
- });
-
- // Add EF services to the service container
- services.AddEntityFramework()
- .AddEntityFrameworkSqlite()
- .AddDbContext(options => {
- options.UseSqlite("Data Source=music-db.sqlite");
- });
-
- // Add Identity services to the services container
- services.AddIdentity()
- .AddEntityFrameworkStores()
- .AddDefaultTokenProviders();
-
- // Configure Auth
- services.Configure(options =>
- {
- options.AddPolicy("app-ManageStore", new AuthorizationPolicyBuilder().RequireClaim("app-ManageStore", "Allowed").Build());
- });
-
- Mapper.Initialize(cfg =>
- {
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- });
- }
-
- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
- public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostingEnvironment env)
- {
- app.UseDeveloperExceptionPage();
-
- // Initialize the sample data
- SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait();
-
- app.UseStaticFiles();
- loggerFactory.AddConsole();
-
- // Add MVC to the request pipeline.
- app.UseMvc(routes =>
- {
- // Matches requests that correspond to an existent controller/action pair
- routes.MapRoute(
- name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
-
- // Matches any other request that doesn't appear to have a filename extension (defined as 'having a dot in the last URI segment').
- // This means you'll correctly get 404s for /some/dir/non-existent-image.png instead of returning the SPA HTML.
- // However, it means requests like /customers/isaac.newton will *not* be mapped into the SPA, so if you need to accept
- // URIs like that you'll need to match all URIs, e.g.:
- // routes.MapRoute("spa-fallback", "{*anything}", new { controller = "Home", action = "Index" });
- // (which of course will match /customers/isaac.png too, so in that case it would serve the PNG image at that URL if one is on disk,
- // or the SPA HTML if not).
- routes.MapSpaFallbackRoute("spa-fallback", new { controller = "Home", action = "Index" });
- });
- }
-
- public static void Main(string[] args)
- {
- var host = new WebHostBuilder()
- .UseContentRoot(Directory.GetCurrentDirectory())
- .UseIISIntegration()
- .UseKestrel()
- .UseStartup()
- .Build();
-
- host.Run();
- }
- }
-}
diff --git a/samples/angular/MusicStore/Views/Home/Index.cshtml b/samples/angular/MusicStore/Views/Home/Index.cshtml
deleted file mode 100755
index a2799f70..00000000
--- a/samples/angular/MusicStore/Views/Home/Index.cshtml
+++ /dev/null
@@ -1,23 +0,0 @@
-@{
- ViewData["Title"] = "Home Page";
-}
-
-
- Loading...
- @await Html.PrimeCacheAsync(Url.Action("GenreMenuList", "GenresApi"))
- @await Html.PrimeCacheAsync(Url.Action("MostPopular", "AlbumsApi"))
-
-
-@section scripts {
-
-
-
-
-
-
-
-
-
-
-
-}
diff --git a/samples/angular/MusicStore/Views/Shared/Error.cshtml b/samples/angular/MusicStore/Views/Shared/Error.cshtml
deleted file mode 100755
index 473b35d6..00000000
--- a/samples/angular/MusicStore/Views/Shared/Error.cshtml
+++ /dev/null
@@ -1,6 +0,0 @@
-@{
- ViewData["Title"] = "Error";
-}
-
-
Error.
-
An error occurred while processing your request.
diff --git a/samples/angular/MusicStore/Views/Shared/_Layout.cshtml b/samples/angular/MusicStore/Views/Shared/_Layout.cshtml
deleted file mode 100755
index 562ccf83..00000000
--- a/samples/angular/MusicStore/Views/Shared/_Layout.cshtml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
- Music Store
-
-
-
-
-
-
-
-
-
-
-
-
- @RenderBody()
-
-
-
-
-
-
-
-
-
-
- @RenderSection("scripts", required: false)
-
-
diff --git a/samples/angular/MusicStore/Views/_ViewImports.cshtml b/samples/angular/MusicStore/Views/_ViewImports.cshtml
deleted file mode 100755
index 3e7a43a3..00000000
--- a/samples/angular/MusicStore/Views/_ViewImports.cshtml
+++ /dev/null
@@ -1,4 +0,0 @@
-@using MusicStore
-@using Microsoft.AspNetCore.AngularServices
-@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers"
-@addTagHelper "*, Microsoft.AspNetCore.SpaServices"
diff --git a/samples/angular/MusicStore/Views/_ViewStart.cshtml b/samples/angular/MusicStore/Views/_ViewStart.cshtml
deleted file mode 100755
index 820a2f6e..00000000
--- a/samples/angular/MusicStore/Views/_ViewStart.cshtml
+++ /dev/null
@@ -1,3 +0,0 @@
-@{
- Layout = "_Layout";
-}
diff --git a/samples/angular/MusicStore/gulpfile.js b/samples/angular/MusicStore/gulpfile.js
deleted file mode 100755
index 215f9932..00000000
--- a/samples/angular/MusicStore/gulpfile.js
+++ /dev/null
@@ -1,53 +0,0 @@
-///
-
-"use strict";
-
-var path = require('path');
-var gulp = require('gulp');
-var del = require('del');
-var typescript = require('gulp-typescript');
-var inlineNg2Template = require('gulp-inline-ng2-template');
-var sourcemaps = require('gulp-sourcemaps');
-
-var webroot = "./wwwroot/";
-
-var config = {
- libBase: 'node_modules',
- lib: [
- require.resolve('bootstrap/dist/css/bootstrap.css'),
- path.dirname(require.resolve('bootstrap/dist/fonts/glyphicons-halflings-regular.woff')) + '/**',
- require.resolve('angular2/bundles/angular2-polyfills.js'),
- require.resolve('traceur/bin/traceur-runtime.js'),
- require.resolve('es6-module-loader/dist/es6-module-loader-sans-promises.js'),
- require.resolve('systemjs/dist/system.src.js'),
- require.resolve('angular2/bundles/angular2.dev.js'),
- require.resolve('angular2/bundles/router.dev.js'),
- require.resolve('angular2/bundles/http.dev.js'),
- require.resolve('angular2-aspnet/bundles/angular2-aspnet.js'),
- require.resolve('jquery/dist/jquery.js'),
- require.resolve('bootstrap/dist/js/bootstrap.js'),
- require.resolve('rxjs/bundles/Rx.js')
- ]
-};
-
-gulp.task('build.lib', function () {
- return gulp.src(config.lib, { base: config.libBase })
- .pipe(gulp.dest(webroot + 'lib'));
-});
-
-gulp.task('build', ['build.lib'], function () {
- var tsProject = typescript.createProject('./tsconfig.json', { typescript: require('typescript') });
- var tsSrcInlined = gulp.src([webroot + '**/*.ts', 'typings/**/*.d.ts'], { base: webroot })
- .pipe(inlineNg2Template({ base: webroot }));
- return tsSrcInlined
- .pipe(sourcemaps.init())
- .pipe(typescript(tsProject))
- .pipe(sourcemaps.write())
- .pipe(gulp.dest(webroot));
-});
-
-gulp.task('clean', function () {
- return del([webroot + 'lib']);
-});
-
-gulp.task('default', ['build']);
diff --git a/samples/angular/MusicStore/package.json b/samples/angular/MusicStore/package.json
deleted file mode 100644
index 1fa631e3..00000000
--- a/samples/angular/MusicStore/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "MusicStore",
- "version": "0.0.0",
- "dependencies": {
- "angular2": "2.0.0-beta.15",
- "angular2-aspnet": "^0.0.6",
- "angular2-universal": "0.98.1",
- "aspnet-prerendering": "^1.0.1",
- "bootstrap": "^3.3.5",
- "css": "^2.2.1",
- "es6-module-loader": "0.15.0",
- "es6-shim": "^0.35.0",
- "isomorphic-fetch": "^2.2.1",
- "jquery": "^2.1.4",
- "less": "^2.5.3",
- "preboot": "2.0.5",
- "rxjs": "5.0.0-beta.2",
- "systemjs": "^0.19.3",
- "traceur": "0.0.106",
- "zone.js": "^0.6.10"
- },
- "devDependencies": {
- "del": "^2.0.2",
- "gulp": "^3.9.0",
- "gulp-inline-ng2-template": "0.0.7",
- "gulp-sourcemaps": "^1.6.0",
- "gulp-typescript": "^2.9.0",
- "typescript": "^1.6.2"
- }
-}
diff --git a/samples/angular/MusicStore/project.json b/samples/angular/MusicStore/project.json
deleted file mode 100755
index ceede625..00000000
--- a/samples/angular/MusicStore/project.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true,
- "preserveCompilationContext": true
- },
- "runtimeOptions": {
- "configProperties": {
- "System.GC.Server": true
- }
- },
- "tooling": {
- "defaultNamespace": "MusicStore"
- },
-
- "dependencies": {
- "Microsoft.NETCore.App": {
- "version": "1.0.1",
- "type": "platform"
- },
- "Microsoft.AspNetCore.AngularServices": "1.0.0-*",
- "Microsoft.AspNetCore.Diagnostics": "1.0.0",
- "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
- "Microsoft.AspNetCore.Mvc": "1.0.1",
- "Microsoft.AspNetCore.Razor.Tools": {
- "version": "1.0.0-preview2-final",
- "type": "build"
- },
- "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
- "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
- "Microsoft.AspNetCore.StaticFiles": "1.0.0",
- "Microsoft.EntityFrameworkCore.SQLite": "1.0.0",
- "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
- "Microsoft.Extensions.Configuration.Json": "1.0.0",
- "Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
- "Microsoft.Extensions.Logging": "1.0.0",
- "Microsoft.Extensions.Logging.Console": "1.0.0",
- "Microsoft.Extensions.Logging.Debug": "1.0.0",
- "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
- "AutoMapper": "5.0.2"
- },
-
- "tools": {
- "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
- "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
- "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final"
- },
-
- "frameworks": {
- "netcoreapp1.0": {
- "imports": [
- "dotnet5.6",
- "portable-net45+win8"
- ]
- }
- },
-
- "publishOptions": {
- "include": [
- "appsettings.json",
- "ClientApp",
- "node_modules",
- "typings",
- "Views",
- "tsconfig.json",
- "tsd.json",
- "web.config",
- "webpack.*.js",
- "wwwroot"
- ]
- },
- "scripts": {
- "prepublish": [
- "npm install",
- "gulp"
- ],
- "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
- }
-}
diff --git a/samples/angular/MusicStore/tsconfig.json b/samples/angular/MusicStore/tsconfig.json
deleted file mode 100644
index a4c5eeb7..00000000
--- a/samples/angular/MusicStore/tsconfig.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "compilerOptions": {
- "module": "commonjs",
- "target": "es5",
- "sourceMap": false,
- "emitDecoratorMetadata": true,
- "experimentalDecorators": true,
- "noLib": false
- },
- "exclude": [
- "node_modules"
- ]
-}
diff --git a/samples/angular/MusicStore/tsd.json b/samples/angular/MusicStore/tsd.json
deleted file mode 100644
index dc2f9671..00000000
--- a/samples/angular/MusicStore/tsd.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "version": "v4",
- "repo": "borisyankov/DefinitelyTyped",
- "ref": "master",
- "path": "typings",
- "bundle": "typings/tsd.d.ts",
- "installed": {
- "es6-shim/es6-shim.d.ts": {
- "commit": "ec9eb4b28c74665a602c22db3457f0a76fa0fa23"
- }
- }
-}
diff --git a/samples/angular/MusicStore/typings/es6-shim/es6-shim.d.ts b/samples/angular/MusicStore/typings/es6-shim/es6-shim.d.ts
deleted file mode 100644
index 1c3df0ed..00000000
--- a/samples/angular/MusicStore/typings/es6-shim/es6-shim.d.ts
+++ /dev/null
@@ -1,668 +0,0 @@
-// Type definitions for es6-shim v0.31.2
-// Project: https://github.com/paulmillr/es6-shim
-// Definitions by: Ron Buckton
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-declare type PropertyKey = string | number | symbol;
-
-interface IteratorResult {
- done: boolean;
- value?: T;
-}
-
-interface IterableShim {
- /**
- * Shim for an ES6 iterable. Not intended for direct use by user code.
- */
- "_es6-shim iterator_"(): Iterator;
-}
-
-interface Iterator {
- next(value?: any): IteratorResult;
- return?(value?: any): IteratorResult;
- throw?(e?: any): IteratorResult;
-}
-
-interface IterableIteratorShim extends IterableShim, Iterator {
- /**
- * Shim for an ES6 iterable iterator. Not intended for direct use by user code.
- */
- "_es6-shim iterator_"(): IterableIteratorShim;
-}
-
-interface StringConstructor {
- /**
- * Return the String value whose elements are, in order, the elements in the List elements.
- * If length is 0, the empty string is returned.
- */
- fromCodePoint(...codePoints: number[]): string;
-
- /**
- * String.raw is intended for use as a tag function of a Tagged Template String. When called
- * as such the first argument will be a well formed template call site object and the rest
- * parameter will contain the substitution values.
- * @param template A well-formed template string call site representation.
- * @param substitutions A set of substitution values.
- */
- raw(template: TemplateStringsArray, ...substitutions: any[]): string;
-}
-
-interface String {
- /**
- * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
- * value of the UTF-16 encoded code point starting at the string element at position pos in
- * the String resulting from converting this object to a String.
- * If there is no element at that position, the result is undefined.
- * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
- */
- codePointAt(pos: number): number;
-
- /**
- * Returns true if searchString appears as a substring of the result of converting this
- * object to a String, at one or more positions that are
- * greater than or equal to position; otherwise, returns false.
- * @param searchString search string
- * @param position If position is undefined, 0 is assumed, so as to search all of the String.
- */
- includes(searchString: string, position?: number): boolean;
-
- /**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * endPosition – length(this). Otherwise returns false.
- */
- endsWith(searchString: string, endPosition?: number): boolean;
-
- /**
- * Returns a String value that is made from count copies appended together. If count is 0,
- * T is the empty String is returned.
- * @param count number of copies to append
- */
- repeat(count: number): string;
-
- /**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * position. Otherwise returns false.
- */
- startsWith(searchString: string, position?: number): boolean;
-
- /**
- * Returns an HTML anchor element and sets the name attribute to the text value
- * @param name
- */
- anchor(name: string): string;
-
- /** Returns a HTML element */
- big(): string;
-
- /** Returns a
diff --git a/samples/misc/NodeServicesExamples/Views/Home/Prerendering.cshtml b/samples/misc/NodeServicesExamples/Views/Home/Prerendering.cshtml
new file mode 100644
index 00000000..bd5fff9d
--- /dev/null
+++ b/samples/misc/NodeServicesExamples/Views/Home/Prerendering.cshtml
@@ -0,0 +1,21 @@
+
Server-side prerendering
+
+
+ This sample demonstrates how you can invoke a JavaScript module that contains
+ prerendering logic for a Single-Page Application framework.
+
+
+ Your prerendering boot function will receive parameters that describe the page
+ being rendered and any data supplied by the .NET code. The return value should be
+ a promise that resolves with data to be injected into the page, such as the
+ rendered HTML and any global data that should be made available to client-side code.
+
+
+@Html.Raw(ViewData["PrerenderedHtml"])
+
+
+
+
diff --git a/samples/misc/NodeServicesExamples/Views/Shared/_Layout.cshtml b/samples/misc/NodeServicesExamples/Views/Shared/_Layout.cshtml
index 23ebe30d..93314312 100755
--- a/samples/misc/NodeServicesExamples/Views/Shared/_Layout.cshtml
+++ b/samples/misc/NodeServicesExamples/Views/Shared/_Layout.cshtml
@@ -1,8 +1,9 @@
-
+
NodeServices Examples
+
@RenderBody()
diff --git a/samples/misc/NodeServicesExamples/package.json b/samples/misc/NodeServicesExamples/package.json
index 6f6640d2..9787758b 100644
--- a/samples/misc/NodeServicesExamples/package.json
+++ b/samples/misc/NodeServicesExamples/package.json
@@ -2,8 +2,9 @@
"name": "nodeservicesexamples",
"version": "0.0.0",
"dependencies": {
+ "aspnet-prerendering": "^2.0.6",
"babel-core": "^6.7.4",
"babel-preset-es2015": "^6.6.0",
- "sharp": "^0.15.0"
+ "node-chartist": "^1.0.2"
}
}
diff --git a/samples/misc/NodeServicesExamples/project.json b/samples/misc/NodeServicesExamples/project.json
deleted file mode 100755
index eb168a66..00000000
--- a/samples/misc/NodeServicesExamples/project.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "version": "1.0.0-*",
- "tooling": {
- "defaultNamespace": "NodeServicesExamples"
- },
- "buildOptions": {
- "emitEntryPoint": true,
- "preserveCompilationContext": true
- },
- "runtimeOptions": {
- "gcServer": true
- },
- "dependencies": {
- "Microsoft.NETCore.App": {
- "version": "1.0.0",
- "type": "platform"
- },
- "Microsoft.AspNetCore.Diagnostics": "1.0.0",
- "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
- "Microsoft.AspNetCore.Mvc": "1.0.0",
- "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0",
- "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
- "Microsoft.AspNetCore.StaticFiles": "1.0.0",
- "Microsoft.Extensions.Configuration.Json": "1.0.0",
- "Microsoft.Extensions.Logging.Console": "1.0.0",
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.Extensions.Logging.Debug": "1.0.0",
- "Microsoft.AspNetCore.NodeServices": "1.0.0-*"
- },
- "frameworks": {
- "netcoreapp1.0": {
- "imports": [
- "dotnet5.6",
- "dnxcore50",
- "portable-net45+win8"
- ]
- }
- },
- "publishExclude": [
- "node_modules",
- "bower_components",
- "**.xproj",
- "**.user",
- "**.vspscc"
- ],
- "scripts": {
- "prepublish": [ "npm install" ],
- "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
- }
-}
diff --git a/samples/misc/NodeServicesExamples/wwwroot/css/chartist.min.css b/samples/misc/NodeServicesExamples/wwwroot/css/chartist.min.css
new file mode 100644
index 00000000..9f9b908e
--- /dev/null
+++ b/samples/misc/NodeServicesExamples/wwwroot/css/chartist.min.css
@@ -0,0 +1 @@
+.ct-double-octave:after,.ct-major-eleventh:after,.ct-major-second:after,.ct-major-seventh:after,.ct-major-sixth:after,.ct-major-tenth:after,.ct-major-third:after,.ct-major-twelfth:after,.ct-minor-second:after,.ct-minor-seventh:after,.ct-minor-sixth:after,.ct-minor-third:after,.ct-octave:after,.ct-perfect-fifth:after,.ct-perfect-fourth:after,.ct-square:after{content:"";clear:both}.ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-grid-background,.ct-line{fill:none}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:block;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-vertical.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-label.ct-vertical.ct-end{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:end}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#f05b4f}.ct-series-i .ct-area,.ct-series-i .ct-slice-pie{fill:#f05b4f}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:100%}.ct-square:after{display:table}.ct-square>svg{display:block;position:absolute;top:0;left:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:93.75%}.ct-minor-second:after{display:table}.ct-minor-second>svg{display:block;position:absolute;top:0;left:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:88.8888888889%}.ct-major-second:after{display:table}.ct-major-second>svg{display:block;position:absolute;top:0;left:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:83.3333333333%}.ct-minor-third:after{display:table}.ct-minor-third>svg{display:block;position:absolute;top:0;left:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:80%}.ct-major-third:after{display:table}.ct-major-third>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:75%}.ct-perfect-fourth:after{display:table}.ct-perfect-fourth>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-perfect-fifth:after{display:table}.ct-perfect-fifth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:62.5%}.ct-minor-sixth:after{display:table}.ct-minor-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:61.804697157%}.ct-golden-section:after{content:"";display:table;clear:both}.ct-golden-section>svg{display:block;position:absolute;top:0;left:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:60%}.ct-major-sixth:after{display:table}.ct-major-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-minor-seventh:after{display:table}.ct-minor-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:53.3333333333%}.ct-major-seventh:after{display:table}.ct-major-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:50%}.ct-octave:after{display:table}.ct-octave>svg{display:block;position:absolute;top:0;left:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:40%}.ct-major-tenth:after{display:table}.ct-major-tenth>svg{display:block;position:absolute;top:0;left:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:37.5%}.ct-major-eleventh:after{display:table}.ct-major-eleventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:33.3333333333%}.ct-major-twelfth:after{display:table}.ct-major-twelfth>svg{display:block;position:absolute;top:0;left:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:25%}.ct-double-octave:after{display:table}.ct-double-octave>svg{display:block;position:absolute;top:0;left:0}
\ No newline at end of file
diff --git a/samples/misc/NodeServicesExamples/wwwroot/images/parrot.jpg b/samples/misc/NodeServicesExamples/wwwroot/images/parrot.jpg
deleted file mode 100644
index 828a55b2..00000000
Binary files a/samples/misc/NodeServicesExamples/wwwroot/images/parrot.jpg and /dev/null differ
diff --git a/samples/misc/Webpack/.gitignore b/samples/misc/Webpack/.gitignore
index 0ca27f04..13634919 100644
--- a/samples/misc/Webpack/.gitignore
+++ b/samples/misc/Webpack/.gitignore
@@ -1,6 +1,9 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
+yarn.lock
+wwwroot/dist
+
# User-specific files
*.suo
*.user
@@ -40,10 +43,6 @@ TestResult.xml
[Rr]eleasePS/
dlldata.c
-# DNX
-project.lock.json
-artifacts/
-
*_i.c
*_p.c
*_i.h
diff --git a/samples/misc/Webpack/ActionResults/PrerenderResult.cs b/samples/misc/Webpack/ActionResults/PrerenderResult.cs
index d038157e..4f2c8f50 100644
--- a/samples/misc/Webpack/ActionResults/PrerenderResult.cs
+++ b/samples/misc/Webpack/ActionResults/PrerenderResult.cs
@@ -27,6 +27,7 @@ public override async Task ExecuteResultAsync(ActionContext context)
{
var nodeServices = context.HttpContext.RequestServices.GetRequiredService();
var hostEnv = context.HttpContext.RequestServices.GetRequiredService();
+ var applicationLifetime = context.HttpContext.RequestServices.GetRequiredService();
var applicationBasePath = hostEnv.ContentRootPath;
var request = context.HttpContext.Request;
var response = context.HttpContext.Response;
@@ -34,11 +35,13 @@ public override async Task ExecuteResultAsync(ActionContext context)
var prerenderedHtml = await Prerenderer.RenderToString(
applicationBasePath,
nodeServices,
+ applicationLifetime.ApplicationStopping,
_moduleExport,
request.GetEncodedUrl(),
request.Path + request.QueryString.Value,
_dataToSupply,
- /* timeoutMilliseconds */ 30000
+ /* timeoutMilliseconds */ 30000,
+ /* requestPathBase */ "/"
);
response.ContentType = "text/html";
diff --git a/samples/misc/Webpack/Clientside/PrerenderingSample.ts b/samples/misc/Webpack/Clientside/PrerenderingSample.ts
deleted file mode 100644
index 143ddd04..00000000
--- a/samples/misc/Webpack/Clientside/PrerenderingSample.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-export default function (params: any): Promise<{ html: string, globals?: any }> {
- return new Promise((resolve, reject) => {
-
- // Here, you could put any logic that synchronously or asynchronously prerenders
- // your SPA components. For example, see the boot-server.ts files in the Angular2Spa
- // and ReactReduxSpa templates for ways to prerender Angular 2 and React components.
- //
- // If you wanted, you could use a property on the 'params.data' object to specify
- // which SPA component or template to render.
-
- const html = `
-
Hello
- It works! You passed ${ JSON.stringify(params.data) }
- and are currently requesting ${ params.location.path }`;
- resolve({ html });
- });
-};
diff --git a/samples/misc/Webpack/Controllers/FullPagePrerenderingController.cs b/samples/misc/Webpack/Controllers/FullPagePrerenderingController.cs
deleted file mode 100644
index 48935459..00000000
--- a/samples/misc/Webpack/Controllers/FullPagePrerenderingController.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.SpaServices.Prerendering;
-using Webpack.ActionResults;
-
-namespace Webpack.Controllers
-{
- // This sample shows how you could invoke the prerendering APIs directly from an MVC
- // action result.
- public class FullPagePrerenderingController : Controller
- {
- private static JavaScriptModuleExport BootModule = new JavaScriptModuleExport("Clientside/PrerenderingSample")
- {
- // Because the boot module is written in TypeScript, we need to specify a webpack
- // config so it can be built. If it was written in JavaScript, this would not be needed.
- WebpackConfig = "webpack.config.js"
- };
-
- public IActionResult Index()
- {
- var dataToSupply = new { nowTime = DateTime.Now.Ticks };
- return this.Prerender(BootModule, dataToSupply);
- }
- }
-}
diff --git a/samples/misc/Webpack/Dockerfile b/samples/misc/Webpack/Dockerfile
deleted file mode 100644
index 63d7c456..00000000
--- a/samples/misc/Webpack/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM microsoft/aspnet:1.0.0-rc1-update1
-
-RUN printf "deb http://ftp.us.debian.org/debian jessie main\n" >> /etc/apt/sources.list
-RUN apt-get -qq update && apt-get install -qqy sqlite3 libsqlite3-dev && rm -rf /var/lib/apt/lists/*
-
-COPY . /app
-WORKDIR /app
-RUN ["dnu", "restore"]
-
-EXPOSE 5000/tcp
-ENTRYPOINT ["dnx", "-p", "project.json", "web"]
diff --git a/samples/misc/Webpack/Startup.cs b/samples/misc/Webpack/Startup.cs
index c81e5c0d..a471781e 100755
--- a/samples/misc/Webpack/Startup.cs
+++ b/samples/misc/Webpack/Startup.cs
@@ -32,7 +32,6 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo
});
app.UseStaticFiles();
- loggerFactory.AddConsole();
app.UseMvc(routes =>
{
routes.MapRoute(
@@ -44,6 +43,11 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo
public static void Main(string[] args)
{
var host = new WebHostBuilder()
+ .ConfigureLogging(factory =>
+ {
+ factory.AddConsole();
+ factory.AddDebug();
+ })
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseKestrel()
diff --git a/samples/misc/Webpack/Views/Home/Index.cshtml b/samples/misc/Webpack/Views/Home/Index.cshtml
index 365dfaad..7828ec19 100755
--- a/samples/misc/Webpack/Views/Home/Index.cshtml
+++ b/samples/misc/Webpack/Views/Home/Index.cshtml
@@ -5,9 +5,6 @@
Hello
Hi there. Enter some text:
-
-See also: Full-page prerendering example
-
@section scripts {
}
diff --git a/samples/misc/Webpack/Webpack.csproj b/samples/misc/Webpack/Webpack.csproj
new file mode 100644
index 00000000..874807b9
--- /dev/null
+++ b/samples/misc/Webpack/Webpack.csproj
@@ -0,0 +1,29 @@
+
+
+
+ netcoreapp3.0
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/misc/Webpack/Webpack.xproj b/samples/misc/Webpack/Webpack.xproj
deleted file mode 100644
index 49bc6e47..00000000
--- a/samples/misc/Webpack/Webpack.xproj
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- 14.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- true
-
-
-
- a8905301-8492-42fd-9e83-f715a0fdc3a2
- Webpack
- ..\..\..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName)
- .\bin\
-
-
- 2.0
- 2018
-
-
-
\ No newline at end of file
diff --git a/samples/misc/Webpack/package.json b/samples/misc/Webpack/package.json
index e894a076..3216132b 100644
--- a/samples/misc/Webpack/package.json
+++ b/samples/misc/Webpack/package.json
@@ -11,9 +11,10 @@
"webpack-hot-middleware": "^2.7.1"
},
"dependencies": {
- "aspnet-webpack": "^1.0.3",
"aspnet-prerendering": "^1.0.4",
+ "aspnet-webpack": "^1.0.3",
"ts-loader": "^0.8.1",
- "typescript": "^1.7.5"
+ "typescript": "^2.0.0",
+ "webpack": "^1.13.3"
}
}
diff --git a/samples/misc/Webpack/project.json b/samples/misc/Webpack/project.json
deleted file mode 100755
index 1b02246b..00000000
--- a/samples/misc/Webpack/project.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true,
- "preserveCompilationContext": true
- },
- "runtimeOptions": {
- "gcServer": true
- },
- "tooling": {
- "defaultNamespace": "Webpack"
- },
- "dependencies": {
- "Microsoft.NETCore.App": {
- "version": "1.0.0",
- "type": "platform"
- },
- "Microsoft.AspNetCore.Diagnostics": "1.0.0",
- "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
- "Microsoft.AspNetCore.Mvc": "1.0.0",
- "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0",
- "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
- "Microsoft.AspNetCore.StaticFiles": "1.0.0",
- "Microsoft.Extensions.Configuration.Json": "1.0.0",
- "Microsoft.Extensions.Logging.Console": "1.0.0",
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.Extensions.Logging.Debug": "1.0.0",
- "Microsoft.AspNetCore.SpaServices": "1.0.0-*"
- },
- "frameworks": {
- "netcoreapp1.0": {
- "imports": [
- "dotnet5.6",
- "dnxcore50",
- "portable-net45+win8"
- ]
- }
- },
- "publishOptions": {
- "exclude": [
- "node_modules",
- "bower_components",
- "**.xproj",
- "**.user",
- "**.vspscc"
- ]
- },
- "scripts": {
- "prepublish": [ "npm install" ],
- "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
- }
-}
diff --git a/samples/misc/Webpack/tsconfig.json b/samples/misc/Webpack/tsconfig.json
index bb577c55..453b7a33 100644
--- a/samples/misc/Webpack/tsconfig.json
+++ b/samples/misc/Webpack/tsconfig.json
@@ -2,9 +2,10 @@
"compilerOptions": {
"moduleResolution": "node",
"module": "commonjs",
- "target": "es6",
+ "target": "es5",
"jsx": "preserve",
- "sourceMap": true
+ "sourceMap": true,
+ "lib": ["es6", "dom"]
},
"exclude": [
"node_modules"
diff --git a/samples/misc/Webpack/webpack.config.dev.js b/samples/misc/Webpack/webpack.config.dev.js
index 08e05f4b..fc339d2e 100644
--- a/samples/misc/Webpack/webpack.config.dev.js
+++ b/samples/misc/Webpack/webpack.config.dev.js
@@ -2,7 +2,7 @@ module.exports = {
devtool: 'inline-source-map',
module: {
loaders: [
- { test: /\.less$/, loader: 'style!css!less' }
+ { test: /\.less$/, loader: 'style-loader!css-loader!less-loader' }
]
}
};
diff --git a/samples/misc/Webpack/webpack.config.prod.js b/samples/misc/Webpack/webpack.config.prod.js
index 5dbe0c8f..56203448 100644
--- a/samples/misc/Webpack/webpack.config.prod.js
+++ b/samples/misc/Webpack/webpack.config.prod.js
@@ -5,11 +5,11 @@ var extractLESS = new ExtractTextPlugin('my-styles.css');
module.exports = {
module: {
loaders: [
- { test: /\.less$/, loader: extractLESS.extract(['css', 'less']) },
+ { test: /\.less$/, loader: extractLESS.extract(['css-loader', 'less-loader']) },
]
},
plugins: [
extractLESS,
- new webpack.optimize.UglifyJsPlugin({ minimize: true })
+ new webpack.optimize.UglifyJsPlugin({ minimize: true, compressor: { warnings: false } })
]
};
diff --git a/samples/react/MusicStore/.babelrc b/samples/react/MusicStore/.babelrc
deleted file mode 100644
index 86c445f5..00000000
--- a/samples/react/MusicStore/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["es2015", "react"]
-}
diff --git a/samples/react/MusicStore/.gitignore b/samples/react/MusicStore/.gitignore
deleted file mode 100644
index bca785d4..00000000
--- a/samples/react/MusicStore/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-music-db.sqlite
-/wwwroot/dist/
-/node_modules/
diff --git a/samples/react/MusicStore/Apis/AlbumsApiController.cs b/samples/react/MusicStore/Apis/AlbumsApiController.cs
deleted file mode 100644
index 511f63c8..00000000
--- a/samples/react/MusicStore/Apis/AlbumsApiController.cs
+++ /dev/null
@@ -1,201 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using AutoMapper;
-using MusicStore.Models;
-using MusicStore.Infrastructure;
-
-namespace MusicStore.Apis
-{
- [Route("api/albums")]
- public class AlbumsApiController : Controller
- {
- private readonly MusicStoreContext _storeContext;
-
- public AlbumsApiController(MusicStoreContext storeContext)
- {
- _storeContext = storeContext;
- }
-
- [HttpGet]
- [NoCache]
- public async Task Paged(int page = 1, int pageSize = 50, string sortBy = null)
- {
- await _storeContext.Genres.LoadAsync();
- await _storeContext.Artists.LoadAsync();
-
- var albums = await _storeContext.Albums
- .Include(a => a.Genre)
- .Include(a => a.Artist)
- .ToPagedListAsync(page, pageSize, sortBy,
- a => a.Title, // sortExpression
- SortDirection.Ascending, // defaultSortDirection
- a => Mapper.Map(a, new AlbumResultDto())); // selector
-
- return Json(albums);
- }
-
- [HttpGet("all")]
- [NoCache]
- public async Task All()
- {
- var albums = await _storeContext.Albums
- .Include(a => a.Genre)
- .Include(a => a.Artist)
- .OrderBy(a => a.Title)
- .ToListAsync();
-
- return Json(albums.Select(a => Mapper.Map(a, new AlbumResultDto())));
- }
-
- [HttpGet("mostPopular")]
- [NoCache]
- public async Task MostPopular(int count = 6)
- {
- count = count > 0 && count < 20 ? count : 6;
- var albums = await _storeContext.Albums
- .OrderByDescending(a => a.OrderDetails.Count())
- .Take(count)
- .ToListAsync();
-
- // TODO: Move the .Select() to end of albums query when EF supports it
- return Json(albums.Select(a => Mapper.Map(a, new AlbumResultDto())));
- }
-
- [HttpGet("{albumId:int}")]
- [NoCache]
- public async Task Details(int albumId)
- {
- await _storeContext.Genres.LoadAsync();
- await _storeContext.Artists.LoadAsync();
-
- var album = await _storeContext.Albums
- .Include(a => a.Artist)
- .Include(a => a.Genre)
- .Where(a => a.AlbumId == albumId)
- .SingleOrDefaultAsync();
-
- var albumResult = Mapper.Map(album, new AlbumResultDto());
-
- // TODO: Add null checking and return 404 in that case
-
- return Json(albumResult);
- }
-
- [HttpPost]
- [Authorize("app-ManageStore")]
- public async Task CreateAlbum([FromBody]AlbumChangeDto album)
- {
- if (!ModelState.IsValid)
- {
- // Return the model errors
- return BadRequest(ModelState);
- }
-
- // Save the changes to the DB
- var dbAlbum = new Album();
- _storeContext.Albums.Add(Mapper.Map(album, dbAlbum));
- await _storeContext.SaveChangesAsync();
-
- // TODO: Handle missing record, key violations, concurrency issues, etc.
-
- return new ObjectResult(new {
- Data = dbAlbum.AlbumId,
- Message = "Album created successfully."
- });
- }
-
- [HttpPut("{albumId:int}/update")]
- public async Task UpdateAlbum(int albumId, [FromBody] AlbumChangeDto album)
- {
- if (!ModelState.IsValid)
- {
- // Return the model errors
- return BadRequest(ModelState);
- }
-
- var dbAlbum = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId);
-
- if (dbAlbum == null)
- {
- return new ObjectResult(new {
- Message = string.Format("The album with ID {0} was not found.", albumId)
- }) { StatusCode = 404 };
- }
-
- // Save the changes to the DB
- Mapper.Map(album, dbAlbum);
- await _storeContext.SaveChangesAsync();
-
- // TODO: Handle missing record, key violations, concurrency issues, etc.
-
- return new ObjectResult (new {
- Message = "Album updated successfully."
- });
- }
-
- [HttpDelete("{albumId:int}")]
- [Authorize("app-ManageStore")]
- public async Task DeleteAlbum(int albumId)
- {
- var album = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId);
-
- if (album != null)
- {
- _storeContext.Albums.Remove(album);
-
- // Save the changes to the DB
- await _storeContext.SaveChangesAsync();
-
- // TODO: Handle missing record, key violations, concurrency issues, etc.
- }
-
- return new ObjectResult (new {
- Message = "Album deleted successfully."
- });
- }
- }
-
- [ModelMetadataType(typeof(Album))]
- public class AlbumChangeDto
- {
- public int GenreId { get; set; }
-
- public int ArtistId { get; set; }
-
- public string Title { get; set; }
-
- public decimal Price { get; set; }
-
- public string AlbumArtUrl { get; set; }
- }
-
- public class AlbumResultDto : AlbumChangeDto
- {
- public AlbumResultDto()
- {
- Artist = new ArtistResultDto();
- Genre = new GenreResultDto();
- }
-
- public int AlbumId { get; set; }
-
- public ArtistResultDto Artist { get; private set; }
-
- public GenreResultDto Genre { get; private set; }
- }
-
- public class ArtistResultDto
- {
- public string Name { get; set; }
- }
-
- public class GenreResultDto
- {
- public string Name { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Apis/ArtistsApiController.cs b/samples/react/MusicStore/Apis/ArtistsApiController.cs
deleted file mode 100644
index f3568aeb..00000000
--- a/samples/react/MusicStore/Apis/ArtistsApiController.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using MusicStore.Models;
-
-namespace MusicStore.Apis
-{
- [Route("api/artists")]
- public class ArtistsApiController : Controller
- {
- private readonly MusicStoreContext _storeContext;
-
- public ArtistsApiController(MusicStoreContext storeContext)
- {
- _storeContext = storeContext;
- }
-
- [HttpGet("lookup")]
- public async Task Lookup()
- {
- var artists = await _storeContext.Artists
- .OrderBy(a => a.Name)
- .ToListAsync();
-
- return Json(artists);
- }
- }
-}
diff --git a/samples/react/MusicStore/Apis/GenresApiController.cs b/samples/react/MusicStore/Apis/GenresApiController.cs
deleted file mode 100644
index 338ca2fc..00000000
--- a/samples/react/MusicStore/Apis/GenresApiController.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using MusicStore.Models;
-using MusicStore.Infrastructure;
-
-namespace MusicStore.Apis
-{
- [Route("api/genres")]
- public class GenresApiController : Controller
- {
- private readonly MusicStoreContext _storeContext;
-
- public GenresApiController(MusicStoreContext storeContext)
- {
- _storeContext = storeContext;
- }
-
- [HttpGet]
- public async Task GenreList()
- {
- var genres = await _storeContext.Genres
- //.Include(g => g.Albums)
- .OrderBy(g => g.Name)
- .ToListAsync();
-
- return Json(genres);
- }
-
- [HttpGet("genre-lookup")]
- public async Task Lookup()
- {
- var genres = await _storeContext.Genres
- .Select(g => new { g.GenreId, g.Name })
- .ToListAsync();
-
- return Json(genres);
- }
-
- [HttpGet("menu")]
- public async Task GenreMenuList(int count = 9)
- {
- count = count > 0 && count < 20 ? count : 9;
-
- var genres = await _storeContext.Genres
- .OrderByDescending(g =>
- g.Albums.Sum(a =>
- a.OrderDetails.Sum(od => od.Quantity)))
- .Take(count)
- .ToListAsync();
-
- return Json(genres);
- }
-
- [HttpGet("{genreId:int}/albums")]
- [NoCache]
- public async Task GenreAlbums(int genreId)
- {
- var albums = await _storeContext.Albums
- .Where(a => a.GenreId == genreId)
- //.Include(a => a.Genre)
- //.Include(a => a.Artist)
- //.OrderBy(a => a.Genre.Name)
- .ToListAsync();
-
- return Json(albums);
- }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/AccountViewModels.cs b/samples/react/MusicStore/Apis/Models/AccountViewModels.cs
deleted file mode 100644
index 831978a5..00000000
--- a/samples/react/MusicStore/Apis/Models/AccountViewModels.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- public class ExternalLoginConfirmationViewModel
- {
- [Required]
- [Display(Name = "User name")]
- public string UserName { get; set; }
- }
-
- public class ManageUserViewModel
- {
- [Required]
- [DataType(DataType.Password)]
- [Display(Name = "Current password")]
- public string OldPassword { get; set; }
-
- [Required]
- [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
- [DataType(DataType.Password)]
- [Display(Name = "New password")]
- public string NewPassword { get; set; }
-
- [DataType(DataType.Password)]
- [Display(Name = "Confirm new password")]
- [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
- public string ConfirmPassword { get; set; }
- }
-
- public class LoginViewModel
- {
- [Required]
- [Display(Name = "User name")]
- public string UserName { get; set; }
-
- [Required]
- [DataType(DataType.Password)]
- [Display(Name = "Password")]
- public string Password { get; set; }
-
- [Display(Name = "Remember me?")]
- public bool RememberMe { get; set; }
- }
-
- public class RegisterViewModel
- {
- [Required]
- [Display(Name = "User name")]
- public string UserName { get; set; }
-
- [Required]
- [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
- [DataType(DataType.Password)]
- [Display(Name = "Password")]
- public string Password { get; set; }
-
- [DataType(DataType.Password)]
- [Display(Name = "Confirm password")]
- [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
- public string ConfirmPassword { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/Album.cs b/samples/react/MusicStore/Apis/Models/Album.cs
deleted file mode 100644
index 68e26ff9..00000000
--- a/samples/react/MusicStore/Apis/Models/Album.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- public class Album
- {
- public Album()
- {
- // TODO: Temporary hack to populate the orderdetails until EF does this automatically.
- OrderDetails = new List();
- }
-
- [ScaffoldColumn(false)]
- public int AlbumId { get; set; }
-
- public int GenreId { get; set; }
-
- public int ArtistId { get; set; }
-
- [Required]
- [StringLength(160, MinimumLength = 2)]
- public string Title { get; set; }
-
- [Required]
- [RangeAttribute(typeof(double), "0.01", "100")] // Long-form constructor to work around https://github.com/dotnet/coreclr/issues/2172
- [DataType(DataType.Currency)]
- public decimal Price { get; set; }
-
- [Display(Name = "Album Art URL")]
- [StringLength(1024)]
- public string AlbumArtUrl { get; set; }
-
- public virtual Genre Genre { get; set; }
-
- public virtual Artist Artist { get; set; }
-
- public virtual ICollection OrderDetails { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/Artist.cs b/samples/react/MusicStore/Apis/Models/Artist.cs
deleted file mode 100644
index b364a898..00000000
--- a/samples/react/MusicStore/Apis/Models/Artist.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- public class Artist
- {
- public int ArtistId { get; set; }
-
- [Required]
- public string Name { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/CartItem.cs b/samples/react/MusicStore/Apis/Models/CartItem.cs
deleted file mode 100644
index 7209462d..00000000
--- a/samples/react/MusicStore/Apis/Models/CartItem.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- public class CartItem
- {
- [Key]
- public int CartItemId { get; set; }
-
- [Required]
- public string CartId { get; set; }
- public int AlbumId { get; set; }
- public int Count { get; set; }
-
- [DataType(DataType.DateTime)]
- public DateTime DateCreated { get; set; }
-
- public virtual Album Album { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/Genre.cs b/samples/react/MusicStore/Apis/Models/Genre.cs
deleted file mode 100644
index eed5616c..00000000
--- a/samples/react/MusicStore/Apis/Models/Genre.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using Newtonsoft.Json;
-
-namespace MusicStore.Models
-{
- public class Genre
- {
- public Genre()
- {
- Albums = new List();
- }
-
- public int GenreId { get; set; }
-
- [Required]
- public string Name { get; set; }
-
- public string Description { get; set; }
-
- [JsonIgnore]
- public virtual ICollection Albums { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs b/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs
deleted file mode 100644
index aee7aedd..00000000
--- a/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore;
-
-namespace MusicStore.Models
-{
- public class ApplicationUser : IdentityUser { }
-
- public class MusicStoreContext : IdentityDbContext
- {
- public MusicStoreContext(DbContextOptions options) : base(options)
- {
- }
-
- public DbSet Albums { get; set; }
- public DbSet Artists { get; set; }
- public DbSet Orders { get; set; }
- public DbSet Genres { get; set; }
- public DbSet CartItems { get; set; }
- public DbSet OrderDetails { get; set; }
-
- protected override void OnModelCreating(ModelBuilder builder)
- {
- // Configure pluralization
- builder.Entity().ToTable("Albums");
- builder.Entity().ToTable("Artists");
- builder.Entity().ToTable("Orders");
- builder.Entity().ToTable("Genres");
- builder.Entity().ToTable("CartItems");
- builder.Entity().ToTable("OrderDetails");
-
- base.OnModelCreating(builder);
- }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/Order.cs b/samples/react/MusicStore/Apis/Models/Order.cs
deleted file mode 100644
index 110a77d8..00000000
--- a/samples/react/MusicStore/Apis/Models/Order.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-
-namespace MusicStore.Models
-{
- //[Bind(Include = "FirstName,LastName,Address,City,State,PostalCode,Country,Phone,Email")]
- public class Order
- {
- public Order()
- {
- OrderDetails = new List();
- }
-
- [ScaffoldColumn(false)]
- public int OrderId { get; set; }
-
- [ScaffoldColumn(false)]
- public DateTime OrderDate { get; set; }
-
- [Required]
- [ScaffoldColumn(false)]
- public string Username { get; set; }
-
- [Required]
- [Display(Name = "First Name")]
- [StringLength(160)]
- public string FirstName { get; set; }
-
- [Required]
- [Display(Name = "Last Name")]
- [StringLength(160)]
- public string LastName { get; set; }
-
- [Required]
- [StringLength(70, MinimumLength = 3)]
- public string Address { get; set; }
-
- [Required]
- [StringLength(40)]
- public string City { get; set; }
-
- [Required]
- [StringLength(40)]
- public string State { get; set; }
-
- [Required]
- [Display(Name = "Postal Code")]
- [StringLength(10, MinimumLength = 5)]
- public string PostalCode { get; set; }
-
- [Required]
- [StringLength(40)]
- public string Country { get; set; }
-
- [Required]
- [StringLength(24)]
- [DataType(DataType.PhoneNumber)]
- public string Phone { get; set; }
-
- [Required]
- [Display(Name = "Email Address")]
- [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}",
- ErrorMessage = "Email is not valid.")]
- [DataType(DataType.EmailAddress)]
- public string Email { get; set; }
-
- [ScaffoldColumn(false)]
- public decimal Total { get; set; }
-
- public ICollection OrderDetails { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/OrderDetail.cs b/samples/react/MusicStore/Apis/Models/OrderDetail.cs
deleted file mode 100644
index cb1e6930..00000000
--- a/samples/react/MusicStore/Apis/Models/OrderDetail.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace MusicStore.Models
-{
- public class OrderDetail
- {
- public int OrderDetailId { get; set; }
- public int OrderId { get; set; }
- public int AlbumId { get; set; }
- public int Quantity { get; set; }
- public decimal UnitPrice { get; set; }
-
- public virtual Album Album { get; set; }
- public virtual Order Order { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/SampleData.cs b/samples/react/MusicStore/Apis/Models/SampleData.cs
deleted file mode 100644
index b1d98a7c..00000000
--- a/samples/react/MusicStore/Apis/Models/SampleData.cs
+++ /dev/null
@@ -1,915 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Claims;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Identity;
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Options;
-
-namespace MusicStore.Models
-{
- public static class SampleData
- {
- const string imgUrl = "/images/placeholder.png";
-
- public static async Task InitializeMusicStoreDatabaseAsync(IServiceProvider serviceProvider)
- {
- using (var db = serviceProvider.GetService())
- {
- if (await db.Database.EnsureCreatedAsync())
- {
- await InsertTestData(serviceProvider);
- }
- }
- }
-
- private static async Task InsertTestData(IServiceProvider serviceProvider)
- {
- var albums = GetAlbums(imgUrl, Genres, Artists);
- await AddOrUpdateAsync(serviceProvider, g => g.GenreId, Genres.Select(genre => genre.Value));
- await AddOrUpdateAsync(serviceProvider, a => a.ArtistId, Artists.Select(artist => artist.Value));
- await AddOrUpdateAsync(serviceProvider, a => a.AlbumId, albums);
- }
-
- // TODO [EF] This may be replaced by a first class mechanism in EF
- private static async Task AddOrUpdateAsync(
- IServiceProvider serviceProvider,
- Func propertyToMatch, IEnumerable entities)
- where TEntity : class
- {
- // Query in a separate context so that we can attach existing entities as modified
- List existingData;
-
- using (var scope = serviceProvider.GetRequiredService().CreateScope())
- using (var db = scope.ServiceProvider.GetService())
- {
- existingData = db.Set().ToList();
- }
-
- using (var scope = serviceProvider.GetRequiredService().CreateScope())
- using (var db = scope.ServiceProvider.GetService())
- {
- foreach (var item in entities)
- {
- db.Entry(item).State = existingData.Any(g => propertyToMatch(g).Equals(propertyToMatch(item)))
- ? EntityState.Modified
- : EntityState.Added;
- }
-
- await db.SaveChangesAsync();
- }
- }
-
- private static Album[] GetAlbums(string imgUrl, Dictionary genres, Dictionary artists)
- {
- var albums = new Album[]
- {
- new Album { Title = "The Best Of The Men At Work", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Men At Work"], AlbumArtUrl = imgUrl },
- new Album { Title = "...And Justice For All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "עד גבול האור", Genre = genres["World"], Price = 8.99M, Artist = artists["אריק אינשטיין"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black Light Syndrome", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Terry Bozzio, Tony Levin & Steve Stevens"], AlbumArtUrl = imgUrl },
- new Album { Title = "10,000 Days", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl },
- new Album { Title = "11i", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Supreme Beings of Leisure"], AlbumArtUrl = imgUrl },
- new Album { Title = "1960", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Soul-Junk"], AlbumArtUrl = imgUrl },
- new Album { Title = "4x4=12 ", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["deadmau5"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Copland Celebration, Vol. I", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Symphony Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Lively Mind", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Paul Oakenfold"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Matter of Life and Death", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Real Dead One", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Real Live One", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Rush of Blood to the Head", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Coldplay"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Soprano Inspired", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Britten Sinfonia, Ivor Bolton & Lesley Garrett"], AlbumArtUrl = imgUrl },
- new Album { Title = "A Winter Symphony", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Abbey Road", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ace Of Spades", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Motörhead"], AlbumArtUrl = imgUrl },
- new Album { Title = "Achtung Baby", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Acústico MTV", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl },
- new Album { Title = "Adams, John: The Chairman Dances", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Edo de Waart & San Francisco Symphony"], AlbumArtUrl = imgUrl },
- new Album { Title = "Adrenaline", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deftones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ænima", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl },
- new Album { Title = "Afrociberdelia", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Science & Nação Zumbi"], AlbumArtUrl = imgUrl },
- new Album { Title = "After the Goldrush", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Neil Young"], AlbumArtUrl = imgUrl },
- new Album { Title = "Airdrawn Dagger", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Sasha"], AlbumArtUrl = imgUrl },
- new Album { Title = "Album Title Goes Here", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["deadmau5"], AlbumArtUrl = imgUrl },
- new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 1]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Label Society"], AlbumArtUrl = imgUrl },
- new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 2]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Label Society"], AlbumArtUrl = imgUrl },
- new Album { Title = "Alive 2007", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Daft Punk"], AlbumArtUrl = imgUrl },
- new Album { Title = "All I Ask of You", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Amen (So Be It)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paddy Casey"], AlbumArtUrl = imgUrl },
- new Album { Title = "Animal Vehicle", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Axis of Awesome"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ao Vivo [IMPORT]", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Zeca Pagodinho"], AlbumArtUrl = imgUrl },
- new Album { Title = "Apocalyptic Love", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Slash"], AlbumArtUrl = imgUrl },
- new Album { Title = "Appetite for Destruction", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Are You Experienced?", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Jimi Hendrix"], AlbumArtUrl = imgUrl },
- new Album { Title = "Arquivo II", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl },
- new Album { Title = "Arquivo Os Paralamas Do Sucesso", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl },
- new Album { Title = "A-Sides", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Soundgarden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Audioslave", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Audioslave"], AlbumArtUrl = imgUrl },
- new Album { Title = "Automatic for the People", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["R.E.M."], AlbumArtUrl = imgUrl },
- new Album { Title = "Axé Bahia 2001", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl },
- new Album { Title = "Babel", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Mumford & Sons"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bach: Goldberg Variations", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Wilhelm Kempff"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bach: The Brandenburg Concertos", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Orchestra of The Age of Enlightenment"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bach: The Cello Suites", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Yo-Yo Ma"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bach: Toccata & Fugue in D Minor", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Ton Koopman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bad Motorfinger", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Soundgarden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Balls to the Wall", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Accept"], AlbumArtUrl = imgUrl },
- new Album { Title = "Banadeek Ta'ala", Genre = genres["World"], Price = 8.99M, Artist = artists["Amr Diab"], AlbumArtUrl = imgUrl },
- new Album { Title = "Barbie Girl", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Aqua"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bark at the Moon (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bartok: Violin & Viola Concertos", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Yehudi Menuhin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Barulhinho Bom", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Marisa Monte"], AlbumArtUrl = imgUrl },
- new Album { Title = "BBC Sessions [Disc 1] [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "BBC Sessions [Disc 2] [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Be Here Now", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Oasis"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bedrock 11 Compiled & Mixed", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["John Digweed"], AlbumArtUrl = imgUrl },
- new Album { Title = "Berlioz: Symphonie Fantastique", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Michael Tilson Thomas"], AlbumArtUrl = imgUrl },
- new Album { Title = "Beyond Good And Evil", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Cult"], AlbumArtUrl = imgUrl },
- new Album { Title = "Big Bad Wolf ", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Armand Van Helden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Big Ones", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Aerosmith"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black Album", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black Sabbath Vol. 4 (Remaster)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Sabbath"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black Sabbath", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Sabbath"], AlbumArtUrl = imgUrl },
- new Album { Title = "Black", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blackwater Park", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Opeth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blizzard of Ozz", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blood", Genre = genres["Rock"], Price = 8.99M, Artist = artists["In This Moment"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blue Moods", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Incognito"], AlbumArtUrl = imgUrl },
- new Album { Title = "Blue", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Weezer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bongo Fury", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Frank Zappa & Captain Beefheart"], AlbumArtUrl = imgUrl },
- new Album { Title = "Boys & Girls", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alabama Shakes"], AlbumArtUrl = imgUrl },
- new Album { Title = "Brave New World", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "B-Sides 1980-1990", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Bunkka", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Paul Oakenfold"], AlbumArtUrl = imgUrl },
- new Album { Title = "By The Way", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Red Hot Chili Peppers"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cake: B-Sides and Rarities", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Cake"], AlbumArtUrl = imgUrl },
- new Album { Title = "Californication", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Red Hot Chili Peppers"], AlbumArtUrl = imgUrl },
- new Album { Title = "Carmina Burana", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Boston Symphony Orchestra & Seiji Ozawa"], AlbumArtUrl = imgUrl },
- new Album { Title = "Carried to Dust (Bonus Track Version)", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Calexico"], AlbumArtUrl = imgUrl },
- new Album { Title = "Carry On", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Chris Cornell"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cássia Eller - Sem Limite [Disc 1]", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cássia Eller"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chemical Wedding", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Bruce Dickinson"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chill: Brazil (Disc 1)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Marcos Valle"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chill: Brazil (Disc 2)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Antônio Carlos Jobim"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chocolate Starfish And The Hot Dog Flavored Water", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Limp Bizkit"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chronicle, Vol. 1", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Creedence Clearwater Revival"], AlbumArtUrl = imgUrl },
- new Album { Title = "Chronicle, Vol. 2", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Creedence Clearwater Revival"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ciao, Baby", Genre = genres["Rock"], Price = 8.99M, Artist = artists["TheStart"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cidade Negra - Hits", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cidade Negra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Classic Munkle: Turbo Edition", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Munkle"], AlbumArtUrl = imgUrl },
- new Album { Title = "Classics: The Best of Sarah Brightman", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Coda", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Come Away With Me", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Norah Jones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Come Taste The Band", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Comfort Eagle", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Cake"], AlbumArtUrl = imgUrl },
- new Album { Title = "Common Reaction", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Uh Huh Her "], AlbumArtUrl = imgUrl },
- new Album { Title = "Compositores", Genre = genres["Rock"], Price = 8.99M, Artist = artists["O Terço"], AlbumArtUrl = imgUrl },
- new Album { Title = "Contraband", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Velvet Revolver"], AlbumArtUrl = imgUrl },
- new Album { Title = "Core", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Stone Temple Pilots"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cornerstone", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Styx"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cosmicolor", Genre = genres["Rap"], Price = 8.99M, Artist = artists["M-Flo"], AlbumArtUrl = imgUrl },
- new Album { Title = "Cross", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Justice"], AlbumArtUrl = imgUrl },
- new Album { Title = "Culture of Fear", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Thievery Corporation"], AlbumArtUrl = imgUrl },
- new Album { Title = "Da Lama Ao Caos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Science & Nação Zumbi"], AlbumArtUrl = imgUrl },
- new Album { Title = "Dakshina", Genre = genres["World"], Price = 8.99M, Artist = artists["Deva Premal"], AlbumArtUrl = imgUrl },
- new Album { Title = "Dark Side of the Moon", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl },
- new Album { Title = "Death Magnetic", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Deep End of Down", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Above the Fold"], AlbumArtUrl = imgUrl },
- new Album { Title = "Deep Purple In Rock", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Deixa Entrar", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Falamansa"], AlbumArtUrl = imgUrl },
- new Album { Title = "Deja Vu", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Crosby, Stills, Nash, and Young"], AlbumArtUrl = imgUrl },
- new Album { Title = "Di Korpu Ku Alma", Genre = genres["World"], Price = 8.99M, Artist = artists["Lura"], AlbumArtUrl = imgUrl },
- new Album { Title = "Diary of a Madman (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Diary of a Madman", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Dirt", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alice in Chains"], AlbumArtUrl = imgUrl },
- new Album { Title = "Diver Down", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Djavan Ao Vivo - Vol. 02", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Djavan"], AlbumArtUrl = imgUrl },
- new Album { Title = "Djavan Ao Vivo - Vol. 1", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Djavan"], AlbumArtUrl = imgUrl },
- new Album { Title = "Drum'n'bass for Papa", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Plug"], AlbumArtUrl = imgUrl },
- new Album { Title = "Duluth", Genre = genres["Country"], Price = 8.99M, Artist = artists["Trampled By Turtles"], AlbumArtUrl = imgUrl },
- new Album { Title = "Dummy", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Portishead"], AlbumArtUrl = imgUrl },
- new Album { Title = "Duos II", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Luciana Souza/Romero Lubambo"], AlbumArtUrl = imgUrl },
- new Album { Title = "Earl Scruggs and Friends", Genre = genres["Country"], Price = 8.99M, Artist = artists["Earl Scruggs"], AlbumArtUrl = imgUrl },
- new Album { Title = "Eden", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "El Camino", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Black Keys"], AlbumArtUrl = imgUrl },
- new Album { Title = "Elegant Gypsy", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Al di Meola"], AlbumArtUrl = imgUrl },
- new Album { Title = "Elements Of Life", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Tiësto"], AlbumArtUrl = imgUrl },
- new Album { Title = "Elis Regina-Minha História", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Elis Regina"], AlbumArtUrl = imgUrl },
- new Album { Title = "Emergency On Planet Earth", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Jamiroquai"], AlbumArtUrl = imgUrl },
- new Album { Title = "Emotion", Genre = genres["World"], Price = 8.99M, Artist = artists["Papa Wemba"], AlbumArtUrl = imgUrl },
- new Album { Title = "English Renaissance", Genre = genres["Classical"], Price = 8.99M, Artist = artists["The King's Singers"], AlbumArtUrl = imgUrl },
- new Album { Title = "Every Kind of Light", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Posies"], AlbumArtUrl = imgUrl },
- new Album { Title = "Faceless", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Godsmack"], AlbumArtUrl = imgUrl },
- new Album { Title = "Facelift", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alice in Chains"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fair Warning", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fear of a Black Planet", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Public Enemy"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fear Of The Dark", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Feels Like Home", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Norah Jones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fireball", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Fly", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "For Those About To Rock We Salute You", Genre = genres["Rock"], Price = 8.99M, Artist = artists["AC/DC"], AlbumArtUrl = imgUrl },
- new Album { Title = "Four", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Blues Traveler"], AlbumArtUrl = imgUrl },
- new Album { Title = "Frank", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Amy Winehouse"], AlbumArtUrl = imgUrl },
- new Album { Title = "Further Down the Spiral", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Nine Inch Nails"], AlbumArtUrl = imgUrl },
- new Album { Title = "Garage Inc. (Disc 1)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Garage Inc. (Disc 2)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Garbage", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Garbage"], AlbumArtUrl = imgUrl },
- new Album { Title = "Good News For People Who Love Bad News", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Modest Mouse"], AlbumArtUrl = imgUrl },
- new Album { Title = "Gordon", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Barenaked Ladies"], AlbumArtUrl = imgUrl },
- new Album { Title = "Górecki: Symphony No. 3", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Adrian Leaper & Doreen de Feis"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Duck Sauce"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Lenny Kravitz"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Hits", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Lenny Kravitz"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greatest Kiss", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Kiss"], AlbumArtUrl = imgUrl },
- new Album { Title = "Greetings from Michigan", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Sufjan Stevens"], AlbumArtUrl = imgUrl },
- new Album { Title = "Group Therapy", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Above & Beyond"], AlbumArtUrl = imgUrl },
- new Album { Title = "Handel: The Messiah (Highlights)", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Scholars Baroque Ensemble"], AlbumArtUrl = imgUrl },
- new Album { Title = "Haydn: Symphonies 99 - 104", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Royal Philharmonic Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Heart of the Night", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Spyro Gyra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Heart On", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Eagles of Death Metal"], AlbumArtUrl = imgUrl },
- new Album { Title = "Holy Diver", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Dio"], AlbumArtUrl = imgUrl },
- new Album { Title = "Homework", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Daft Punk"], AlbumArtUrl = imgUrl },
- new Album { Title = "Hot Rocks, 1964-1971 (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Houses Of The Holy", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "How To Dismantle An Atomic Bomb", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Human", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Projected"], AlbumArtUrl = imgUrl },
- new Album { Title = "Hunky Dory", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Bowie"], AlbumArtUrl = imgUrl },
- new Album { Title = "Hymns", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Projected"], AlbumArtUrl = imgUrl },
- new Album { Title = "Hysteria", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Def Leppard"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Absentia", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Porcupine Tree"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Between", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Paul Van Dyk"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Rainbows", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Radiohead"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Step", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Stevie Ray Vaughan & Double Trouble"], AlbumArtUrl = imgUrl },
- new Album { Title = "In the court of the Crimson King", Genre = genres["Rock"], Price = 8.99M, Artist = artists["King Crimson"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Through The Out Door", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Your Honor [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl },
- new Album { Title = "In Your Honor [Disc 2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl },
- new Album { Title = "Indestructible", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rancid"], AlbumArtUrl = imgUrl },
- new Album { Title = "Infinity", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Journey"], AlbumArtUrl = imgUrl },
- new Album { Title = "Into The Light", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Coverdale"], AlbumArtUrl = imgUrl },
- new Album { Title = "Introspective", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Pet Shop Boys"], AlbumArtUrl = imgUrl },
- new Album { Title = "Iron Maiden", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "ISAM", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Amon Tobin"], AlbumArtUrl = imgUrl },
- new Album { Title = "IV", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Jagged Little Pill", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Alanis Morissette"], AlbumArtUrl = imgUrl },
- new Album { Title = "Jagged Little Pill", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alanis Morissette"], AlbumArtUrl = imgUrl },
- new Album { Title = "Jorge Ben Jor 25 Anos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Jorge Ben"], AlbumArtUrl = imgUrl },
- new Album { Title = "Jota Quest-1995", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Jota Quest"], AlbumArtUrl = imgUrl },
- new Album { Title = "Kick", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["INXS"], AlbumArtUrl = imgUrl },
- new Album { Title = "Kill 'Em All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Kind of Blue", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl },
- new Album { Title = "King For A Day Fool For A Lifetime", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Faith No More"], AlbumArtUrl = imgUrl },
- new Album { Title = "Kiss", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Carly Rae Jepsen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Last Call", Genre = genres["Country"], Price = 8.99M, Artist = artists["Cayouche"], AlbumArtUrl = imgUrl },
- new Album { Title = "Le Freak", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Chic"], AlbumArtUrl = imgUrl },
- new Album { Title = "Le Tigre", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Le Tigre"], AlbumArtUrl = imgUrl },
- new Album { Title = "Led Zeppelin I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Led Zeppelin II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Led Zeppelin III", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Let There Be Rock", Genre = genres["Rock"], Price = 8.99M, Artist = artists["AC/DC"], AlbumArtUrl = imgUrl },
- new Album { Title = "Little Earthquakes", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Tori Amos"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live [Disc 1]", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live [Disc 2]", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live After Death", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live At Donington 1992 (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live At Donington 1992 (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live on Earth", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["The Cat Empire"], AlbumArtUrl = imgUrl },
- new Album { Title = "Live On Two Legs [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl },
- new Album { Title = "Living After Midnight", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Judas Priest"], AlbumArtUrl = imgUrl },
- new Album { Title = "Living", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paddy Casey"], AlbumArtUrl = imgUrl },
- new Album { Title = "Load", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Love Changes Everything", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "MacArthur Park Suite", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Donna Summer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Machine Head", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Magical Mystery Tour", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mais Do Mesmo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Legião Urbana"], AlbumArtUrl = imgUrl },
- new Album { Title = "Maquinarama", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Skank"], AlbumArtUrl = imgUrl },
- new Album { Title = "Marasim", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Jagjit Singh"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mascagni: Cavalleria Rusticana", Genre = genres["Classical"], Price = 8.99M, Artist = artists["James Levine"], AlbumArtUrl = imgUrl },
- new Album { Title = "Master of Puppets", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mechanics & Mathematics", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Venus Hum"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mental Jewelry", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Live"], AlbumArtUrl = imgUrl },
- new Album { Title = "Metallics", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "meteora", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Linkin Park"], AlbumArtUrl = imgUrl },
- new Album { Title = "Meus Momentos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Gonzaguinha"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mezmerize", Genre = genres["Metal"], Price = 8.99M, Artist = artists["System Of A Down"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mezzanine", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Massive Attack"], AlbumArtUrl = imgUrl },
- new Album { Title = "Miles Ahead", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl },
- new Album { Title = "Milton Nascimento Ao Vivo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Milton Nascimento"], AlbumArtUrl = imgUrl },
- new Album { Title = "Minas", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Milton Nascimento"], AlbumArtUrl = imgUrl },
- new Album { Title = "Minha Historia", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Buarque"], AlbumArtUrl = imgUrl },
- new Album { Title = "Misplaced Childhood", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Marillion"], AlbumArtUrl = imgUrl },
- new Album { Title = "MK III The Final Concerts [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Morning Dance", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Spyro Gyra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Motley Crue Greatest Hits", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Mötley Crüe"], AlbumArtUrl = imgUrl },
- new Album { Title = "Moving Pictures", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rush"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mozart: Chamber Music", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Nash Ensemble"], AlbumArtUrl = imgUrl },
- new Album { Title = "Mozart: Symphonies Nos. 40 & 41", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Berliner Philharmoniker"], AlbumArtUrl = imgUrl },
- new Album { Title = "Murder Ballads", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Nick Cave and the Bad Seeds"], AlbumArtUrl = imgUrl },
- new Album { Title = "Music For The Jilted Generation", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["The Prodigy"], AlbumArtUrl = imgUrl },
- new Album { Title = "My Generation - The Very Best Of The Who", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Who"], AlbumArtUrl = imgUrl },
- new Album { Title = "My Name is Skrillex", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Skrillex"], AlbumArtUrl = imgUrl },
- new Album { Title = "Na Pista", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cláudio Zoli"], AlbumArtUrl = imgUrl },
- new Album { Title = "Nevermind", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Nirvana"], AlbumArtUrl = imgUrl },
- new Album { Title = "New Adventures In Hi-Fi", Genre = genres["Rock"], Price = 8.99M, Artist = artists["R.E.M."], AlbumArtUrl = imgUrl },
- new Album { Title = "New Divide", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Linkin Park"], AlbumArtUrl = imgUrl },
- new Album { Title = "New York Dolls", Genre = genres["Punk"], Price = 8.99M, Artist = artists["New York Dolls"], AlbumArtUrl = imgUrl },
- new Album { Title = "News Of The World", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Nielsen: The Six Symphonies", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Göteborgs Symfoniker & Neeme Järvi"], AlbumArtUrl = imgUrl },
- new Album { Title = "Night At The Opera", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Night Castle", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Trans-Siberian Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Nkolo", Genre = genres["World"], Price = 8.99M, Artist = artists["Lokua Kanza"], AlbumArtUrl = imgUrl },
- new Album { Title = "No More Tears (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "No Prayer For The Dying", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "No Security", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl },
- new Album { Title = "O Brother, Where Art Thou?", Genre = genres["Country"], Price = 8.99M, Artist = artists["Alison Krauss"], AlbumArtUrl = imgUrl },
- new Album { Title = "O Samba Poconé", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Skank"], AlbumArtUrl = imgUrl },
- new Album { Title = "O(+>", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Prince"], AlbumArtUrl = imgUrl },
- new Album { Title = "Oceania", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Smashing Pumpkins"], AlbumArtUrl = imgUrl },
- new Album { Title = "Off the Deep End", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Weird Al"], AlbumArtUrl = imgUrl },
- new Album { Title = "OK Computer", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Radiohead"], AlbumArtUrl = imgUrl },
- new Album { Title = "Olodum", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Olodum"], AlbumArtUrl = imgUrl },
- new Album { Title = "One Love", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["David Guetta"], AlbumArtUrl = imgUrl },
- new Album { Title = "Operation: Mindcrime", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Queensrÿche"], AlbumArtUrl = imgUrl },
- new Album { Title = "Opiate", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl },
- new Album { Title = "Outbreak", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Dennis Chambers"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pachelbel: Canon & Gigue", Genre = genres["Classical"], Price = 8.99M, Artist = artists["English Concert & Trevor Pinnock"], AlbumArtUrl = imgUrl },
- new Album { Title = "Paid in Full", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Eric B. and Rakim"], AlbumArtUrl = imgUrl },
- new Album { Title = "Para Siempre", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Vicente Fernandez"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pause", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Four Tet"], AlbumArtUrl = imgUrl },
- new Album { Title = "Peace Sells... but Who's Buying", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Megadeth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Physical Graffiti [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Physical Graffiti [Disc 2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Physical Graffiti", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Piece Of Mind", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pinkerton", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Weezer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Plays Metallica By Four Cellos", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Apocalyptica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pop", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Powerslave", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Prenda Minha", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Caetano Veloso"], AlbumArtUrl = imgUrl },
- new Album { Title = "Presence", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Pretty Hate Machine", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Nine Inch Nails"], AlbumArtUrl = imgUrl },
- new Album { Title = "Prisoner", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Jezabels"], AlbumArtUrl = imgUrl },
- new Album { Title = "Privateering", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Mark Knopfler"], AlbumArtUrl = imgUrl },
- new Album { Title = "Prokofiev: Romeo & Juliet", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Michael Tilson Thomas"], AlbumArtUrl = imgUrl },
- new Album { Title = "Prokofiev: Symphony No.1", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sergei Prokofiev & Yuri Temirkanov"], AlbumArtUrl = imgUrl },
- new Album { Title = "PSY's Best 6th Part 1", Genre = genres["Pop"], Price = 8.99M, Artist = artists["PSY"], AlbumArtUrl = imgUrl },
- new Album { Title = "Purcell: The Fairy Queen", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Classical Players"], AlbumArtUrl = imgUrl },
- new Album { Title = "Purpendicular", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Purple", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Stone Temple Pilots"], AlbumArtUrl = imgUrl },
- new Album { Title = "Quanta Gente Veio Ver (Live)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Gilberto Gil"], AlbumArtUrl = imgUrl },
- new Album { Title = "Quanta Gente Veio ver--Bônus De Carnaval", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Gilberto Gil"], AlbumArtUrl = imgUrl },
- new Album { Title = "Quiet Songs", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Aisha Duo"], AlbumArtUrl = imgUrl },
- new Album { Title = "Raices", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Los Tigres del Norte"], AlbumArtUrl = imgUrl },
- new Album { Title = "Raising Hell", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Run DMC"], AlbumArtUrl = imgUrl },
- new Album { Title = "Raoul and the Kings of Spain ", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tears For Fears"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rattle And Hum", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Raul Seixas", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Raul Seixas"], AlbumArtUrl = imgUrl },
- new Album { Title = "Recovery [Explicit]", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Eminem"], AlbumArtUrl = imgUrl },
- new Album { Title = "Reign In Blood", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Slayer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Relayed", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Yes"], AlbumArtUrl = imgUrl },
- new Album { Title = "ReLoad", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Respighi:Pines of Rome", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Eugene Ormandy"], AlbumArtUrl = imgUrl },
- new Album { Title = "Restless and Wild", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Accept"], AlbumArtUrl = imgUrl },
- new Album { Title = "Retrospective I (1974-1980)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rush"], AlbumArtUrl = imgUrl },
- new Album { Title = "Revelations", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Audioslave"], AlbumArtUrl = imgUrl },
- new Album { Title = "Revolver", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ride the Lighting ", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ride The Lightning", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ring My Bell", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Anita Ward"], AlbumArtUrl = imgUrl },
- new Album { Title = "Riot Act", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rise of the Phoenix", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Before the Dawn"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rock In Rio [CD1]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rock In Rio [CD2]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rock In Rio [CD2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Roda De Funk", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Funk Como Le Gusta"], AlbumArtUrl = imgUrl },
- new Album { Title = "Room for Squares", Genre = genres["Pop"], Price = 8.99M, Artist = artists["John Mayer"], AlbumArtUrl = imgUrl },
- new Album { Title = "Root Down", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Jimmy Smith"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rounds", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Four Tet"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rubber Factory", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Black Keys"], AlbumArtUrl = imgUrl },
- new Album { Title = "Rust in Peace", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Megadeth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Sambas De Enredo 2001", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl },
- new Album { Title = "Santana - As Years Go By", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl },
- new Album { Title = "Santana Live", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl },
- new Album { Title = "Saturday Night Fever", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Bee Gees"], AlbumArtUrl = imgUrl },
- new Album { Title = "Scary Monsters and Nice Sprites", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Skrillex"], AlbumArtUrl = imgUrl },
- new Album { Title = "Scheherazade", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Chicago Symphony Orchestra & Fritz Reiner"], AlbumArtUrl = imgUrl },
- new Album { Title = "SCRIABIN: Vers la flamme", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Christopher O'Riley"], AlbumArtUrl = imgUrl },
- new Album { Title = "Second Coming", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Stone Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Serie Sem Limite (Disc 1)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Tim Maia"], AlbumArtUrl = imgUrl },
- new Album { Title = "Serie Sem Limite (Disc 2)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Tim Maia"], AlbumArtUrl = imgUrl },
- new Album { Title = "Serious About Men", Genre = genres["Rap"], Price = 8.99M, Artist = artists["The Rubberbandits"], AlbumArtUrl = imgUrl },
- new Album { Title = "Seventh Son of a Seventh Son", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Short Bus", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Filter"], AlbumArtUrl = imgUrl },
- new Album { Title = "Sibelius: Finlandia", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Berliner Philharmoniker"], AlbumArtUrl = imgUrl },
- new Album { Title = "Singles Collection", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Bowie"], AlbumArtUrl = imgUrl },
- new Album { Title = "Six Degrees of Inner Turbulence", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Dream Theater"], AlbumArtUrl = imgUrl },
- new Album { Title = "Slave To The Empire", Genre = genres["Metal"], Price = 8.99M, Artist = artists["T&N"], AlbumArtUrl = imgUrl },
- new Album { Title = "Slaves And Masters", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Slouching Towards Bethlehem", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Robert James"], AlbumArtUrl = imgUrl },
- new Album { Title = "Smash", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Offspring"], AlbumArtUrl = imgUrl },
- new Album { Title = "Something Special", Genre = genres["Country"], Price = 8.99M, Artist = artists["Dolly Parton"], AlbumArtUrl = imgUrl },
- new Album { Title = "Somewhere in Time", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Song(s) You Know By Heart", Genre = genres["Country"], Price = 8.99M, Artist = artists["Jimmy Buffett"], AlbumArtUrl = imgUrl },
- new Album { Title = "Sound of Music", Genre = genres["Punk"], Price = 8.99M, Artist = artists["Adicts"], AlbumArtUrl = imgUrl },
- new Album { Title = "South American Getaway", Genre = genres["Classical"], Price = 8.99M, Artist = artists["The 12 Cellists of The Berlin Philharmonic"], AlbumArtUrl = imgUrl },
- new Album { Title = "Sozinho Remix Ao Vivo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Caetano Veloso"], AlbumArtUrl = imgUrl },
- new Album { Title = "Speak of the Devil", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Spiritual State", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Nujabes"], AlbumArtUrl = imgUrl },
- new Album { Title = "St. Anger", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl },
- new Album { Title = "Still Life", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Opeth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Stop Making Sense", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Talking Heads"], AlbumArtUrl = imgUrl },
- new Album { Title = "Stormbringer", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "Stranger than Fiction", Genre = genres["Punk"], Price = 8.99M, Artist = artists["Bad Religion"], AlbumArtUrl = imgUrl },
- new Album { Title = "Strauss: Waltzes", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Eugene Ormandy"], AlbumArtUrl = imgUrl },
- new Album { Title = "Supermodified", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Amon Tobin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Supernatural", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl },
- new Album { Title = "Surfing with the Alien (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Joe Satriani"], AlbumArtUrl = imgUrl },
- new Album { Title = "Switched-On Bach", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Wendy Carlos"], AlbumArtUrl = imgUrl },
- new Album { Title = "Symphony", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Szymanowski: Piano Works, Vol. 1", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Martin Roscoe"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tchaikovsky: The Nutcracker", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Symphony Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ted Nugent", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ted Nugent"], AlbumArtUrl = imgUrl },
- new Album { Title = "Teflon Don", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Rick Ross"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tell Another Joke at the Ol' Choppin' Block", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Danielson Famile"], AlbumArtUrl = imgUrl },
- new Album { Title = "Temple of the Dog", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Temple of the Dog"], AlbumArtUrl = imgUrl },
- new Album { Title = "Ten", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl },
- new Album { Title = "Texas Flood", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Stevie Ray Vaughan"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Battle Rages On", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Beast Live", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paul D'Ianno"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best Of 1980-1990", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best of 1990–2000", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best of Beethoven", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Nicolaus Esterhazy Sinfonia"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best Of Billy Cobham", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Billy Cobham"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best of Ed Motta", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Ed Motta"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Best Of Van Halen, Vol. I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Bridge", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Melanie Fiona"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Cage", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tygers of Pan Tang"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Chicago Transit Authority", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Chicago "], AlbumArtUrl = imgUrl },
- new Album { Title = "The Chronic", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Dr. Dre"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Colour And The Shape", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Crane Wife", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["The Decemberists"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Cream Of Clapton", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Cure", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Cure"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Dark Side Of The Moon", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Divine Conspiracy", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Epica"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Doors", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Doors"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Dream of the Blue Turtles", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Sting"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Essential Miles Davis [Disc 1]", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Essential Miles Davis [Disc 2]", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Final Concerts (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Final Frontier", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Head and the Heart", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Head and the Heart"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Joshua Tree", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Last Night of the Proms", Genre = genres["Classical"], Price = 8.99M, Artist = artists["BBC Concert Orchestra"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Lumineers", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Lumineers"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Number of The Beast", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Number of The Beast", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Police Greatest Hits", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Police"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Song Remains The Same (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Song Remains The Same (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Southern Harmony and Musical Companion", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Spade", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Butch Walker & The Black Widows"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Stone Roses", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Stone Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Suburbs", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Arcade Fire"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Three Tenors Disc1/Disc2", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Carreras, Pavarotti, Domingo"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Trees They Grow So High", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "The Wall", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl },
- new Album { Title = "The X Factor", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Them Crooked Vultures", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Them Crooked Vultures"], AlbumArtUrl = imgUrl },
- new Album { Title = "This Is Happening", Genre = genres["Rock"], Price = 8.99M, Artist = artists["LCD Soundsystem"], AlbumArtUrl = imgUrl },
- new Album { Title = "Thunder, Lightning, Strike", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Go! Team"], AlbumArtUrl = imgUrl },
- new Album { Title = "Time to Say Goodbye", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl },
- new Album { Title = "Time, Love & Tenderness", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Michael Bolton"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tomorrow Starts Today", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Mobile"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tribute", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl },
- new Album { Title = "Tuesday Night Music Club", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Sheryl Crow"], AlbumArtUrl = imgUrl },
- new Album { Title = "Umoja", Genre = genres["Rock"], Price = 8.99M, Artist = artists["BLØF"], AlbumArtUrl = imgUrl },
- new Album { Title = "Under the Pink", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Tori Amos"], AlbumArtUrl = imgUrl },
- new Album { Title = "Undertow", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl },
- new Album { Title = "Un-Led-Ed", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Dread Zeppelin"], AlbumArtUrl = imgUrl },
- new Album { Title = "Unplugged [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Kiss"], AlbumArtUrl = imgUrl },
- new Album { Title = "Unplugged", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl },
- new Album { Title = "Unplugged", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl },
- new Album { Title = "Untrue", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Burial"], AlbumArtUrl = imgUrl },
- new Album { Title = "Use Your Illusion I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Use Your Illusion II", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Use Your Illusion II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl },
- new Album { Title = "Van Halen III", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Van Halen", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl },
- new Album { Title = "Version 2.0", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Garbage"], AlbumArtUrl = imgUrl },
- new Album { Title = "Vinicius De Moraes", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Vinícius De Moraes"], AlbumArtUrl = imgUrl },
- new Album { Title = "Virtual XI", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl },
- new Album { Title = "Voodoo Lounge", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Vozes do MPB", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl },
- new Album { Title = "Vs.", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl },
- new Album { Title = "Wagner: Favourite Overtures", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sir Georg Solti & Wiener Philharmoniker"], AlbumArtUrl = imgUrl },
- new Album { Title = "Walking Into Clarksdale", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Page & Plant"], AlbumArtUrl = imgUrl },
- new Album { Title = "Wapi Yo", Genre = genres["World"], Price = 8.99M, Artist = artists["Lokua Kanza"], AlbumArtUrl = imgUrl },
- new Album { Title = "War", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Warner 25 Anos", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Antônio Carlos Jobim"], AlbumArtUrl = imgUrl },
- new Album { Title = "Wasteland R&Btheque", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Raunchy"], AlbumArtUrl = imgUrl },
- new Album { Title = "Watermark", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Enya"], AlbumArtUrl = imgUrl },
- new Album { Title = "We Were Exploding Anyway", Genre = genres["Rock"], Price = 8.99M, Artist = artists["65daysofstatic"], AlbumArtUrl = imgUrl },
- new Album { Title = "Weill: The Seven Deadly Sins", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Orchestre de l'Opéra de Lyon"], AlbumArtUrl = imgUrl },
- new Album { Title = "White Pony", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deftones"], AlbumArtUrl = imgUrl },
- new Album { Title = "Who's Next", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Who"], AlbumArtUrl = imgUrl },
- new Album { Title = "Wish You Were Here", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl },
- new Album { Title = "With Oden on Our Side", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Amon Amarth"], AlbumArtUrl = imgUrl },
- new Album { Title = "Worlds", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Aaron Goldberg"], AlbumArtUrl = imgUrl },
- new Album { Title = "Worship Music", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Anthrax"], AlbumArtUrl = imgUrl },
- new Album { Title = "X&Y", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Coldplay"], AlbumArtUrl = imgUrl },
- new Album { Title = "Xinti", Genre = genres["World"], Price = 8.99M, Artist = artists["Sara Tavares"], AlbumArtUrl = imgUrl },
- new Album { Title = "Yano", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Yano"], AlbumArtUrl = imgUrl },
- new Album { Title = "Yesterday Once More Disc 1/Disc 2", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Carpenters"], AlbumArtUrl = imgUrl },
- new Album { Title = "Zooropa", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl },
- new Album { Title = "Zoso", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl },
- };
-
- foreach (var album in albums)
- {
- album.ArtistId = album.Artist.ArtistId;
- album.GenreId = album.Genre.GenreId;
- }
-
- return albums;
- }
-
- private static Dictionary artists;
- public static Dictionary Artists
- {
- get
- {
- if (artists == null)
- {
- var artistsList = new Artist[]
- {
- new Artist { Name = "65daysofstatic" },
- new Artist { Name = "Aaron Goldberg" },
- new Artist { Name = "Above & Beyond" },
- new Artist { Name = "Above the Fold" },
- new Artist { Name = "AC/DC" },
- new Artist { Name = "Accept" },
- new Artist { Name = "Adicts" },
- new Artist { Name = "Adrian Leaper & Doreen de Feis" },
- new Artist { Name = "Aerosmith" },
- new Artist { Name = "Aisha Duo" },
- new Artist { Name = "Al di Meola" },
- new Artist { Name = "Alabama Shakes" },
- new Artist { Name = "Alanis Morissette" },
- new Artist { Name = "Alberto Turco & Nova Schola Gregoriana" },
- new Artist { Name = "Alice in Chains" },
- new Artist { Name = "Alison Krauss" },
- new Artist { Name = "Amon Amarth" },
- new Artist { Name = "Amon Tobin" },
- new Artist { Name = "Amr Diab" },
- new Artist { Name = "Amy Winehouse" },
- new Artist { Name = "Anita Ward" },
- new Artist { Name = "Anthrax" },
- new Artist { Name = "Antônio Carlos Jobim" },
- new Artist { Name = "Apocalyptica" },
- new Artist { Name = "Aqua" },
- new Artist { Name = "Armand Van Helden" },
- new Artist { Name = "Arcade Fire" },
- new Artist { Name = "Audioslave" },
- new Artist { Name = "Bad Religion" },
- new Artist { Name = "Barenaked Ladies" },
- new Artist { Name = "BBC Concert Orchestra" },
- new Artist { Name = "Bee Gees" },
- new Artist { Name = "Before the Dawn" },
- new Artist { Name = "Berliner Philharmoniker" },
- new Artist { Name = "Billy Cobham" },
- new Artist { Name = "Black Label Society" },
- new Artist { Name = "Black Sabbath" },
- new Artist { Name = "BLØF" },
- new Artist { Name = "Blues Traveler" },
- new Artist { Name = "Boston Symphony Orchestra & Seiji Ozawa" },
- new Artist { Name = "Britten Sinfonia, Ivor Bolton & Lesley Garrett" },
- new Artist { Name = "Bruce Dickinson" },
- new Artist { Name = "Buddy Guy" },
- new Artist { Name = "Burial" },
- new Artist { Name = "Butch Walker & The Black Widows" },
- new Artist { Name = "Caetano Veloso" },
- new Artist { Name = "Cake" },
- new Artist { Name = "Calexico" },
- new Artist { Name = "Carly Rae Jepsen" },
- new Artist { Name = "Carreras, Pavarotti, Domingo" },
- new Artist { Name = "Cássia Eller" },
- new Artist { Name = "Cayouche" },
- new Artist { Name = "Chic" },
- new Artist { Name = "Chicago " },
- new Artist { Name = "Chicago Symphony Orchestra & Fritz Reiner" },
- new Artist { Name = "Chico Buarque" },
- new Artist { Name = "Chico Science & Nação Zumbi" },
- new Artist { Name = "Choir Of Westminster Abbey & Simon Preston" },
- new Artist { Name = "Chris Cornell" },
- new Artist { Name = "Christopher O'Riley" },
- new Artist { Name = "Cidade Negra" },
- new Artist { Name = "Cláudio Zoli" },
- new Artist { Name = "Coldplay" },
- new Artist { Name = "Creedence Clearwater Revival" },
- new Artist { Name = "Crosby, Stills, Nash, and Young" },
- new Artist { Name = "Daft Punk" },
- new Artist { Name = "Danielson Famile" },
- new Artist { Name = "David Bowie" },
- new Artist { Name = "David Coverdale" },
- new Artist { Name = "David Guetta" },
- new Artist { Name = "deadmau5" },
- new Artist { Name = "Deep Purple" },
- new Artist { Name = "Def Leppard" },
- new Artist { Name = "Deftones" },
- new Artist { Name = "Dennis Chambers" },
- new Artist { Name = "Deva Premal" },
- new Artist { Name = "Dio" },
- new Artist { Name = "Djavan" },
- new Artist { Name = "Dolly Parton" },
- new Artist { Name = "Donna Summer" },
- new Artist { Name = "Dr. Dre" },
- new Artist { Name = "Dread Zeppelin" },
- new Artist { Name = "Dream Theater" },
- new Artist { Name = "Duck Sauce" },
- new Artist { Name = "Earl Scruggs" },
- new Artist { Name = "Ed Motta" },
- new Artist { Name = "Edo de Waart & San Francisco Symphony" },
- new Artist { Name = "Elis Regina" },
- new Artist { Name = "Eminem" },
- new Artist { Name = "English Concert & Trevor Pinnock" },
- new Artist { Name = "Enya" },
- new Artist { Name = "Epica" },
- new Artist { Name = "Eric B. and Rakim" },
- new Artist { Name = "Eric Clapton" },
- new Artist { Name = "Eugene Ormandy" },
- new Artist { Name = "Faith No More" },
- new Artist { Name = "Falamansa" },
- new Artist { Name = "Filter" },
- new Artist { Name = "Foo Fighters" },
- new Artist { Name = "Four Tet" },
- new Artist { Name = "Frank Zappa & Captain Beefheart" },
- new Artist { Name = "Fretwork" },
- new Artist { Name = "Funk Como Le Gusta" },
- new Artist { Name = "Garbage" },
- new Artist { Name = "Gerald Moore" },
- new Artist { Name = "Gilberto Gil" },
- new Artist { Name = "Godsmack" },
- new Artist { Name = "Gonzaguinha" },
- new Artist { Name = "Göteborgs Symfoniker & Neeme Järvi" },
- new Artist { Name = "Guns N' Roses" },
- new Artist { Name = "Gustav Mahler" },
- new Artist { Name = "In This Moment" },
- new Artist { Name = "Incognito" },
- new Artist { Name = "INXS" },
- new Artist { Name = "Iron Maiden" },
- new Artist { Name = "Jagjit Singh" },
- new Artist { Name = "James Levine" },
- new Artist { Name = "Jamiroquai" },
- new Artist { Name = "Jimi Hendrix" },
- new Artist { Name = "Jimmy Buffett" },
- new Artist { Name = "Jimmy Smith" },
- new Artist { Name = "Joe Satriani" },
- new Artist { Name = "John Digweed" },
- new Artist { Name = "John Mayer" },
- new Artist { Name = "Jorge Ben" },
- new Artist { Name = "Jota Quest" },
- new Artist { Name = "Journey" },
- new Artist { Name = "Judas Priest" },
- new Artist { Name = "Julian Bream" },
- new Artist { Name = "Justice" },
- new Artist { Name = "Orchestre de l'Opéra de Lyon" },
- new Artist { Name = "King Crimson" },
- new Artist { Name = "Kiss" },
- new Artist { Name = "LCD Soundsystem" },
- new Artist { Name = "Le Tigre" },
- new Artist { Name = "Led Zeppelin" },
- new Artist { Name = "Legião Urbana" },
- new Artist { Name = "Lenny Kravitz" },
- new Artist { Name = "Les Arts Florissants & William Christie" },
- new Artist { Name = "Limp Bizkit" },
- new Artist { Name = "Linkin Park" },
- new Artist { Name = "Live" },
- new Artist { Name = "Lokua Kanza" },
- new Artist { Name = "London Symphony Orchestra" },
- new Artist { Name = "Los Tigres del Norte" },
- new Artist { Name = "Luciana Souza/Romero Lubambo" },
- new Artist { Name = "Lulu Santos" },
- new Artist { Name = "Lura" },
- new Artist { Name = "Marcos Valle" },
- new Artist { Name = "Marillion" },
- new Artist { Name = "Marisa Monte" },
- new Artist { Name = "Mark Knopfler" },
- new Artist { Name = "Martin Roscoe" },
- new Artist { Name = "Massive Attack" },
- new Artist { Name = "Maurizio Pollini" },
- new Artist { Name = "Megadeth" },
- new Artist { Name = "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" },
- new Artist { Name = "Melanie Fiona" },
- new Artist { Name = "Men At Work" },
- new Artist { Name = "Metallica" },
- new Artist { Name = "M-Flo" },
- new Artist { Name = "Michael Bolton" },
- new Artist { Name = "Michael Tilson Thomas" },
- new Artist { Name = "Miles Davis" },
- new Artist { Name = "Milton Nascimento" },
- new Artist { Name = "Mobile" },
- new Artist { Name = "Modest Mouse" },
- new Artist { Name = "Mötley Crüe" },
- new Artist { Name = "Motörhead" },
- new Artist { Name = "Mumford & Sons" },
- new Artist { Name = "Munkle" },
- new Artist { Name = "Nash Ensemble" },
- new Artist { Name = "Neil Young" },
- new Artist { Name = "New York Dolls" },
- new Artist { Name = "Nick Cave and the Bad Seeds" },
- new Artist { Name = "Nicolaus Esterhazy Sinfonia" },
- new Artist { Name = "Nine Inch Nails" },
- new Artist { Name = "Nirvana" },
- new Artist { Name = "Norah Jones" },
- new Artist { Name = "Nujabes" },
- new Artist { Name = "O Terço" },
- new Artist { Name = "Oasis" },
- new Artist { Name = "Olodum" },
- new Artist { Name = "Opeth" },
- new Artist { Name = "Orchestra of The Age of Enlightenment" },
- new Artist { Name = "Os Paralamas Do Sucesso" },
- new Artist { Name = "Ozzy Osbourne" },
- new Artist { Name = "Paddy Casey" },
- new Artist { Name = "Page & Plant" },
- new Artist { Name = "Papa Wemba" },
- new Artist { Name = "Paul D'Ianno" },
- new Artist { Name = "Paul Oakenfold" },
- new Artist { Name = "Paul Van Dyk" },
- new Artist { Name = "Pearl Jam" },
- new Artist { Name = "Pet Shop Boys" },
- new Artist { Name = "Pink Floyd" },
- new Artist { Name = "Plug" },
- new Artist { Name = "Porcupine Tree" },
- new Artist { Name = "Portishead" },
- new Artist { Name = "Prince" },
- new Artist { Name = "Projected" },
- new Artist { Name = "PSY" },
- new Artist { Name = "Public Enemy" },
- new Artist { Name = "Queen" },
- new Artist { Name = "Queensrÿche" },
- new Artist { Name = "R.E.M." },
- new Artist { Name = "Radiohead" },
- new Artist { Name = "Rancid" },
- new Artist { Name = "Raul Seixas" },
- new Artist { Name = "Raunchy" },
- new Artist { Name = "Red Hot Chili Peppers" },
- new Artist { Name = "Rick Ross" },
- new Artist { Name = "Robert James" },
- new Artist { Name = "London Classical Players" },
- new Artist { Name = "Royal Philharmonic Orchestra" },
- new Artist { Name = "Run DMC" },
- new Artist { Name = "Rush" },
- new Artist { Name = "Santana" },
- new Artist { Name = "Sara Tavares" },
- new Artist { Name = "Sarah Brightman" },
- new Artist { Name = "Sasha" },
- new Artist { Name = "Scholars Baroque Ensemble" },
- new Artist { Name = "Scorpions" },
- new Artist { Name = "Sergei Prokofiev & Yuri Temirkanov" },
- new Artist { Name = "Sheryl Crow" },
- new Artist { Name = "Sir Georg Solti & Wiener Philharmoniker" },
- new Artist { Name = "Skank" },
- new Artist { Name = "Skrillex" },
- new Artist { Name = "Slash" },
- new Artist { Name = "Slayer" },
- new Artist { Name = "Soul-Junk" },
- new Artist { Name = "Soundgarden" },
- new Artist { Name = "Spyro Gyra" },
- new Artist { Name = "Stevie Ray Vaughan & Double Trouble" },
- new Artist { Name = "Stevie Ray Vaughan" },
- new Artist { Name = "Sting" },
- new Artist { Name = "Stone Temple Pilots" },
- new Artist { Name = "Styx" },
- new Artist { Name = "Sufjan Stevens" },
- new Artist { Name = "Supreme Beings of Leisure" },
- new Artist { Name = "System Of A Down" },
- new Artist { Name = "T&N" },
- new Artist { Name = "Talking Heads" },
- new Artist { Name = "Tears For Fears" },
- new Artist { Name = "Ted Nugent" },
- new Artist { Name = "Temple of the Dog" },
- new Artist { Name = "Terry Bozzio, Tony Levin & Steve Stevens" },
- new Artist { Name = "The 12 Cellists of The Berlin Philharmonic" },
- new Artist { Name = "The Axis of Awesome" },
- new Artist { Name = "The Beatles" },
- new Artist { Name = "The Black Crowes" },
- new Artist { Name = "The Black Keys" },
- new Artist { Name = "The Carpenters" },
- new Artist { Name = "The Cat Empire" },
- new Artist { Name = "The Cult" },
- new Artist { Name = "The Cure" },
- new Artist { Name = "The Decemberists" },
- new Artist { Name = "The Doors" },
- new Artist { Name = "The Eagles of Death Metal" },
- new Artist { Name = "The Go! Team" },
- new Artist { Name = "The Head and the Heart" },
- new Artist { Name = "The Jezabels" },
- new Artist { Name = "The King's Singers" },
- new Artist { Name = "The Lumineers" },
- new Artist { Name = "The Offspring" },
- new Artist { Name = "The Police" },
- new Artist { Name = "The Posies" },
- new Artist { Name = "The Prodigy" },
- new Artist { Name = "The Rolling Stones" },
- new Artist { Name = "The Rubberbandits" },
- new Artist { Name = "The Smashing Pumpkins" },
- new Artist { Name = "The Stone Roses" },
- new Artist { Name = "The Who" },
- new Artist { Name = "Them Crooked Vultures" },
- new Artist { Name = "TheStart" },
- new Artist { Name = "Thievery Corporation" },
- new Artist { Name = "Tiësto" },
- new Artist { Name = "Tim Maia" },
- new Artist { Name = "Ton Koopman" },
- new Artist { Name = "Tool" },
- new Artist { Name = "Tori Amos" },
- new Artist { Name = "Trampled By Turtles" },
- new Artist { Name = "Trans-Siberian Orchestra" },
- new Artist { Name = "Tygers of Pan Tang" },
- new Artist { Name = "U2" },
- new Artist { Name = "UB40" },
- new Artist { Name = "Uh Huh Her " },
- new Artist { Name = "Van Halen" },
- new Artist { Name = "Various Artists" },
- new Artist { Name = "Velvet Revolver" },
- new Artist { Name = "Venus Hum" },
- new Artist { Name = "Vicente Fernandez" },
- new Artist { Name = "Vinícius De Moraes" },
- new Artist { Name = "Weezer" },
- new Artist { Name = "Weird Al" },
- new Artist { Name = "Wendy Carlos" },
- new Artist { Name = "Wilhelm Kempff" },
- new Artist { Name = "Yano" },
- new Artist { Name = "Yehudi Menuhin" },
- new Artist { Name = "Yes" },
- new Artist { Name = "Yo-Yo Ma" },
- new Artist { Name = "Zeca Pagodinho" },
- new Artist { Name = "אריק אינשטיין"}
- };
-
- // TODO [EF] Swap to store generated keys when available
- int artistId = 1;
- artists = new Dictionary();
- foreach (Artist artist in artistsList)
- {
- artist.ArtistId = artistId++;
- artists.Add(artist.Name, artist);
- }
- }
-
- return artists;
- }
- }
-
- private static Dictionary genres;
- public static Dictionary Genres
- {
- get
- {
- if (genres == null)
- {
- var genresList = new Genre[]
- {
- new Genre { Name = "Pop" },
- new Genre { Name = "Rock" },
- new Genre { Name = "Jazz" },
- new Genre { Name = "Metal" },
- new Genre { Name = "Electronic" },
- new Genre { Name = "Blues" },
- new Genre { Name = "Latin" },
- new Genre { Name = "Rap" },
- new Genre { Name = "Classical" },
- new Genre { Name = "Alternative" },
- new Genre { Name = "Country" },
- new Genre { Name = "R&B" },
- new Genre { Name = "Indie" },
- new Genre { Name = "Punk" },
- new Genre { Name = "World" }
- };
-
- genres = new Dictionary();
- // TODO [EF] Swap to store generated keys when available
- int genreId = 1;
- foreach (Genre genre in genresList)
- {
- genre.GenreId = genreId++;
-
- // TODO [EF] Remove when null values are supported by update pipeline
- genre.Description = genre.Name + " is great music (if you like it).";
-
- genres.Add(genre.Name, genre);
- }
- }
-
- return genres;
- }
- }
- }
-}
diff --git a/samples/react/MusicStore/Apis/Models/ShoppingCart.cs b/samples/react/MusicStore/Apis/Models/ShoppingCart.cs
deleted file mode 100644
index 1d2465ab..00000000
--- a/samples/react/MusicStore/Apis/Models/ShoppingCart.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-using Microsoft.AspNetCore.Http;
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace MusicStore.Models
-{
- public partial class ShoppingCart
- {
- MusicStoreContext _db;
- string ShoppingCartId { get; set; }
-
- public ShoppingCart(MusicStoreContext db)
- {
- _db = db;
- }
-
- public static ShoppingCart GetCart(MusicStoreContext db, HttpContext context)
- {
- var cart = new ShoppingCart(db);
- cart.ShoppingCartId = cart.GetCartId(context);
- return cart;
- }
-
- public void AddToCart(Album album)
- {
- // Get the matching cart and album instances
- var cartItem = _db.CartItems.SingleOrDefault(
- c => c.CartId == ShoppingCartId
- && c.AlbumId == album.AlbumId);
-
- if (cartItem == null)
- {
- // TODO [EF] Swap to store generated key once we support identity pattern
- var nextCartItemId = _db.CartItems.Any()
- ? _db.CartItems.Max(c => c.CartItemId) + 1
- : 1;
-
- // Create a new cart item if no cart item exists
- cartItem = new CartItem
- {
- CartItemId = nextCartItemId,
- AlbumId = album.AlbumId,
- CartId = ShoppingCartId,
- Count = 1,
- DateCreated = DateTime.Now
- };
-
- _db.CartItems.Add(cartItem);
- }
- else
- {
- // If the item does exist in the cart, then add one to the quantity
- cartItem.Count++;
-
- // TODO [EF] Remove this line once change detection is available
- _db.Update(cartItem);
- }
- }
-
- public int RemoveFromCart(int id)
- {
- // Get the cart
- var cartItem = _db.CartItems.Single(
- cart => cart.CartId == ShoppingCartId
- && cart.CartItemId == id);
-
- int itemCount = 0;
-
- if (cartItem != null)
- {
- if (cartItem.Count > 1)
- {
- cartItem.Count--;
-
- // TODO [EF] Remove this line once change detection is available
- _db.Update(cartItem);
-
- itemCount = cartItem.Count;
- }
- else
- {
- _db.CartItems.Remove(cartItem);
- }
- }
-
- return itemCount;
- }
-
- public void EmptyCart()
- {
- var cartItems = _db.CartItems.Where(cart => cart.CartId == ShoppingCartId);
-
- foreach (var cartItem in cartItems)
- {
- _db.Remove(cartItem);
- }
- }
-
- public List GetCartItems()
- {
- var cartItems = _db.CartItems.Where(cart => cart.CartId == ShoppingCartId).ToList();
- //TODO: Auto population of the related album data not available until EF feature is lighted up.
- foreach (var cartItem in cartItems)
- {
- cartItem.Album = _db.Albums.Single(a => a.AlbumId == cartItem.AlbumId);
- }
-
- return cartItems;
- }
-
- public int GetCount()
- {
- // Get the count of each item in the cart and sum them up
- int? count = (from cartItems in _db.CartItems
- where cartItems.CartId == ShoppingCartId
- select (int?)cartItems.Count).Sum();
-
- // Return 0 if all entries are null
- return count ?? 0;
- }
-
- public decimal GetTotal()
- {
- // Multiply album price by count of that album to get
- // the current price for each of those albums in the cart
- // sum all album price totals to get the cart total
-
- // TODO Collapse to a single query once EF supports querying related data
- decimal total = 0;
- foreach (var item in _db.CartItems.Where(c => c.CartId == ShoppingCartId))
- {
- var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId);
- total += item.Count * album.Price;
- }
-
- return total;
- }
-
- public int CreateOrder(Order order)
- {
- decimal orderTotal = 0;
-
- var cartItems = GetCartItems();
-
- // TODO [EF] Swap to store generated identity key when supported
- var nextId = _db.OrderDetails.Any()
- ? _db.OrderDetails.Max(o => o.OrderDetailId) + 1
- : 1;
-
- // Iterate over the items in the cart, adding the order details for each
- foreach (var item in cartItems)
- {
- //var album = _db.Albums.Find(item.AlbumId);
- var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId);
-
- var orderDetail = new OrderDetail
- {
- OrderDetailId = nextId,
- AlbumId = item.AlbumId,
- OrderId = order.OrderId,
- UnitPrice = album.Price,
- Quantity = item.Count,
- };
-
- // Set the order total of the shopping cart
- orderTotal += (item.Count * album.Price);
-
- _db.OrderDetails.Add(orderDetail);
-
- nextId++;
- }
-
- // Set the order's total to the orderTotal count
- order.Total = orderTotal;
-
- // Empty the shopping cart
- EmptyCart();
-
- // Return the OrderId as the confirmation number
- return order.OrderId;
- }
-
- // We're using HttpContextBase to allow access to cookies.
- public string GetCartId(HttpContext context)
- {
- var sessionCookie = context.Request.Cookies["Session"];
- string cartId = null;
-
- if (string.IsNullOrWhiteSpace(sessionCookie))
- {
- //A GUID to hold the cartId.
- cartId = Guid.NewGuid().ToString();
-
- // Send cart Id as a cookie to the client.
- context.Response.Cookies.Append("Session", cartId);
- }
- else
- {
- cartId = sessionCookie;
- }
-
- return cartId;
- }
- }
-}
diff --git a/samples/react/MusicStore/Controllers/HomeController.cs b/samples/react/MusicStore/Controllers/HomeController.cs
deleted file mode 100755
index 1048e083..00000000
--- a/samples/react/MusicStore/Controllers/HomeController.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-
-namespace MusicStore.Controllers
-{
- public class HomeController : Controller
- {
- public IActionResult Index()
- {
- return View();
- }
- }
-}
diff --git a/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs b/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs
deleted file mode 100644
index 856023a8..00000000
--- a/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using System;
-using Microsoft.AspNetCore.Mvc.Filters;
-
-namespace MusicStore.Infrastructure
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
- public sealed class NoCacheAttribute : ActionFilterAttribute
- {
- public override void OnResultExecuting(ResultExecutingContext context)
- {
- context.HttpContext.Response.Headers["Cache-Control"] = "no-cache, no-store, max-age=0";
- context.HttpContext.Response.Headers["Pragma"] = "no-cache";
- context.HttpContext.Response.Headers["Expires"] = "-1";
-
- base.OnResultExecuting(context);
- }
- }
-}
diff --git a/samples/react/MusicStore/Infrastructure/PagedList.cs b/samples/react/MusicStore/Infrastructure/PagedList.cs
deleted file mode 100644
index b2cb2c57..00000000
--- a/samples/react/MusicStore/Infrastructure/PagedList.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-
-namespace MusicStore.Infrastructure
-{
- public interface IPagedList
- {
- IEnumerable Data { get; }
-
- int Page { get; }
-
- int PageSize { get; }
-
- int TotalCount { get; }
- }
-
- internal class PagedList : IPagedList
- {
- public PagedList(IEnumerable data, int page, int pageSize, int totalCount)
- {
- Data = data;
- Page = page;
- PageSize = pageSize;
- TotalCount = totalCount;
- }
-
- public IEnumerable Data { get; private set; }
-
- public int Page { get; private set; }
-
- public int PageSize { get; private set; }
-
- public int TotalCount { get; private set; }
- }
-
- public static class PagedListExtensions
- {
- public static IPagedList ToPagedList(this IQueryable query, int page, int pageSize)
- {
- if (query == null)
- {
- throw new ArgumentNullException("query");
- }
-
- var pagingConfig = new PagingConfig(page, pageSize);
- var skipCount = ValidatePagePropertiesAndGetSkipCount(pagingConfig);
-
- var data = query
- .Skip(skipCount)
- .Take(pagingConfig.PageSize)
- .ToList();
-
- if (skipCount > 0 && data.Count == 0)
- {
- // Requested page has no records, just return the first page
- pagingConfig.Page = 1;
- data = query
- .Take(pagingConfig.PageSize)
- .ToList();
- }
-
- return new PagedList(data, pagingConfig.Page, pagingConfig.PageSize, query.Count());
- }
-
- public static Task> ToPagedListAsync(this IQueryable query, int page, int pageSize, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection = SortDirection.Ascending)
- where TModel : class
- {
- return ToPagedListAsync(query, page, pageSize, sortExpression, defaultSortExpression, defaultSortDirection, null);
- }
-
- public static async Task> ToPagedListAsync(this IQueryable query, int page, int pageSize, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection, Func selector)
- where TModel : class
- where TResult : class
- {
- if (query == null)
- {
- throw new ArgumentNullException("query");
- }
-
- var pagingConfig = new PagingConfig(page, pageSize);
- var skipCount = ValidatePagePropertiesAndGetSkipCount(pagingConfig);
- var dataQuery = query;
-
- if (defaultSortExpression != null)
- {
- dataQuery = dataQuery
- .SortBy(sortExpression, defaultSortExpression);
- }
-
- var data = await dataQuery
- .Skip(skipCount)
- .Take(pagingConfig.PageSize)
- .ToListAsync();
-
- if (skipCount > 0 && data.Count == 0)
- {
- // Requested page has no records, just return the first page
- pagingConfig.Page = 1;
- data = await dataQuery
- .Take(pagingConfig.PageSize)
- .ToListAsync();
- }
-
- var count = await query.CountAsync();
-
- var resultData = selector != null
- ? data.Select(selector)
- : data.Cast();
-
- return new PagedList(resultData, pagingConfig.Page, pagingConfig.PageSize, count);
- }
-
- private static int ValidatePagePropertiesAndGetSkipCount(PagingConfig pagingConfig)
- {
- if (pagingConfig.Page < 1)
- {
- pagingConfig.Page = 1;
- }
-
- if (pagingConfig.PageSize < 10)
- {
- pagingConfig.PageSize = 10;
- }
-
- if (pagingConfig.PageSize > 100)
- {
- pagingConfig.PageSize = 100;
- }
-
- return pagingConfig.PageSize * (pagingConfig.Page - 1);
- }
-
- internal class PagingConfig
- {
- public PagingConfig(int page, int pageSize)
- {
- Page = page;
- PageSize = pageSize;
- }
-
- public int Page { get; set; }
-
- public int PageSize { get; set; }
- }
- }
-}
diff --git a/samples/react/MusicStore/Infrastructure/SortDirection.cs b/samples/react/MusicStore/Infrastructure/SortDirection.cs
deleted file mode 100644
index 28f7e86c..00000000
--- a/samples/react/MusicStore/Infrastructure/SortDirection.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace MusicStore.Infrastructure
-{
- public enum SortDirection
- {
- Ascending,
- Descending
- }
-}
diff --git a/samples/react/MusicStore/Infrastructure/SortExpression.cs b/samples/react/MusicStore/Infrastructure/SortExpression.cs
deleted file mode 100644
index 88ba312c..00000000
--- a/samples/react/MusicStore/Infrastructure/SortExpression.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal;
-
-namespace MusicStore.Infrastructure
-{
- public static class SortExpression
- {
- private const string SORT_DIRECTION_DESC = " DESC";
-
- public static IQueryable SortBy(this IQueryable query, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection = SortDirection.Ascending) where TModel : class
- {
- return SortBy(query, sortExpression ?? Create(defaultSortExpression, defaultSortDirection));
- }
-
- public static string Create(Expression> expression, SortDirection sortDirection = SortDirection.Ascending) where TModel : class
- {
- var expressionText = ExpressionHelper.GetExpressionText(expression);
- // TODO: Validate the expression depth, etc.
-
- var sortExpression = expressionText;
-
- if (sortDirection == SortDirection.Descending)
- {
- sortExpression += SORT_DIRECTION_DESC;
- }
-
- return sortExpression;
- }
-
- public static IQueryable SortBy(this IQueryable source, string sortExpression) where T : class
- {
- if (source == null)
- {
- throw new ArgumentNullException("source");
- }
-
- if (String.IsNullOrWhiteSpace(sortExpression))
- {
- return source;
- }
-
- sortExpression = sortExpression.Trim();
- var isDescending = false;
-
- // DataSource control passes the sort parameter with a direction
- // if the direction is descending
- if (sortExpression.EndsWith(SORT_DIRECTION_DESC, StringComparison.OrdinalIgnoreCase))
- {
- isDescending = true;
- var descIndex = sortExpression.Length - SORT_DIRECTION_DESC.Length;
- sortExpression = sortExpression.Substring(0, descIndex).Trim();
- }
-
- if (string.IsNullOrEmpty(sortExpression))
- {
- return source;
- }
-
- ParameterExpression parameter = Expression.Parameter(source.ElementType, String.Empty);
-
- // Build up the property expression, e.g.: (m => m.Foo.Bar)
- var sortExpressionParts = sortExpression.Split('.');
- Expression propertyExpression = parameter;
- foreach (var property in sortExpressionParts)
- {
- propertyExpression = Expression.Property(propertyExpression, property);
- }
-
- LambdaExpression lambda = Expression.Lambda(propertyExpression, parameter);
-
- var methodName = (isDescending) ? "OrderByDescending" : "OrderBy";
-
- Expression methodCallExpression = Expression.Call(
- typeof(Queryable),
- methodName,
- new[] { source.ElementType, propertyExpression.Type },
- source.Expression,
- Expression.Quote(lambda));
-
- return (IQueryable)source.Provider.CreateQuery(methodCallExpression);
- }
- }
-}
diff --git a/samples/react/MusicStore/MusicStore.xproj b/samples/react/MusicStore/MusicStore.xproj
deleted file mode 100644
index 672fd3fc..00000000
--- a/samples/react/MusicStore/MusicStore.xproj
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- 14.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- true
-
-
-
- c870a92c-9e3f-4bf2-82b8-5758545a8b7c
- MusicStore
- ..\..\..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName)
- .\bin\
-
-
- 2.0
- 2018
-
-
-
\ No newline at end of file
diff --git a/samples/react/MusicStore/Properties/launchSettings.json b/samples/react/MusicStore/Properties/launchSettings.json
deleted file mode 100644
index e4360431..00000000
--- a/samples/react/MusicStore/Properties/launchSettings.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:51586/",
- "sslPort": 0
- }
- },
- "profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "dotnet cli": {
- "commandName": "Project",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/samples/react/MusicStore/ReactApp/boot-server.tsx b/samples/react/MusicStore/ReactApp/boot-server.tsx
deleted file mode 100644
index 4bf5d6e3..00000000
--- a/samples/react/MusicStore/ReactApp/boot-server.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as React from 'react';
-import { Provider } from 'react-redux';
-import { renderToString } from 'react-dom/server';
-import { match, RouterContext } from 'react-router';
-import createMemoryHistory from 'history/lib/createMemoryHistory';
-import { routes } from './routes';
-import configureStore from './configureStore';
-React;
-
-export default function (params: any): Promise<{ html: string }> {
- return new Promise<{ html: string, globals: { [key: string]: any } }>((resolve, reject) => {
- // Match the incoming request against the list of client-side routes
- match({ routes, location: params.location }, (error, redirectLocation, renderProps: any) => {
- if (error) {
- throw error;
- }
-
- // Build an instance of the application
- const history = createMemoryHistory(params.url);
- const store = configureStore(history);
- const app = (
-
-
-
- );
-
- // Perform an initial render that will cause any async tasks (e.g., data access) to begin
- renderToString(app);
-
- // Once the tasks are done, we can perform the final render
- // We also send the redux store state, so the client can continue execution where the server left off
- params.domainTasks.then(() => {
- resolve({
- html: renderToString(app),
- globals: { initialReduxState: store.getState() }
- });
- }, reject); // Also propagate any errors back into the host application
- });
- });
-}
diff --git a/samples/react/MusicStore/ReactApp/boot.tsx b/samples/react/MusicStore/ReactApp/boot.tsx
deleted file mode 100644
index ad8f367e..00000000
--- a/samples/react/MusicStore/ReactApp/boot.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import * as React from 'react';
-import * as ReactDOM from 'react-dom';
-import { browserHistory, Router } from 'react-router';
-import { Provider } from 'react-redux';
-React; // Need this reference otherwise TypeScript doesn't think we're using it and ignores the import
-
-import './styles/styles.css';
-import 'bootstrap/dist/css/bootstrap.css';
-import configureStore from './configureStore';
-import { routes } from './routes';
-import { ApplicationState } from './store';
-
-const initialState = (window as any).initialReduxState as ApplicationState;
-const store = configureStore(browserHistory, initialState);
-
-ReactDOM.render(
-
-
- ,
- document.getElementById('react-app')
-);
diff --git a/samples/react/MusicStore/ReactApp/components/NavMenu.tsx b/samples/react/MusicStore/ReactApp/components/NavMenu.tsx
deleted file mode 100644
index 6e85da85..00000000
--- a/samples/react/MusicStore/ReactApp/components/NavMenu.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import * as React from 'react';
-import { Navbar, Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
-import { Link } from 'react-router';
-import { LinkContainer } from 'react-router-bootstrap';
-import { provide } from 'redux-typed';
-import { ApplicationState } from '../store';
-import * as GenreList from '../store/GenreList';
-
-class NavMenu extends React.Component {
- componentWillMount() {
- this.props.requestGenresList();
- }
-
- public render() {
- const genres = this.props.genres.slice(0, 5);
- return (
-
-
- Music Store
-
-
-
-
-
-
- );
- }
-}
-
-// Selects which part of global state maps to this component, and defines a type for the resulting props
-const provider = provide(
- (state: ApplicationState) => state.genreList,
- GenreList.actionCreators
-);
-type NavMenuProps = typeof provider.allProps;
-export default provider.connect(NavMenu);
diff --git a/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx b/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx
deleted file mode 100644
index 6e6fab2e..00000000
--- a/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import * as React from 'react';
-import { Link } from 'react-router';
-import { provide } from 'redux-typed';
-import { ApplicationState } from '../../store';
-import * as AlbumDetailsState from '../../store/AlbumDetails';
-
-interface RouteParams {
- albumId: string;
-}
-
-class AlbumDetails extends React.Component {
- componentWillMount() {
- this.props.requestAlbumDetails(parseInt(this.props.params.albumId));
- }
-
- componentWillReceiveProps(nextProps: AlbumDetailsProps) {
- this.props.requestAlbumDetails(parseInt(nextProps.params.albumId));
- }
-
- public render() {
- if (this.props.album) {
- const albumData = this.props.album;
- return
-
{ albumData.Title }
-
-
-
-
-
- Genre:
- { albumData.Genre.Name }
-
-
- Artist:
- { albumData.Artist.Name }
-
-
- Price:
- ${ albumData.Price.toFixed(2) }
-
-
- Add to cart
-
-
-
;
- } else {
- return
Loading...
;
- }
- }
-}
-
-// Selects which part of global state maps to this component, and defines a type for the resulting props
-const provider = provide(
- (state: ApplicationState) => state.albumDetails,
- AlbumDetailsState.actionCreators
-).withExternalProps<{ params: RouteParams }>();
-type AlbumDetailsProps = typeof provider.allProps;
-export default provider.connect(AlbumDetails);
diff --git a/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx b/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx
deleted file mode 100644
index 04b74d54..00000000
--- a/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import * as React from 'react';
-import { Link } from 'react-router';
-import { Album } from '../../store/FeaturedAlbums';
-
-export class AlbumTile extends React.Component<{ album: Album, key?: any }, void> {
- public render() {
- const { album } = this.props;
- return (
-
-
-
-
{ album.Title }
-
-
- );
- }
-}
diff --git a/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx b/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx
deleted file mode 100644
index 59dc50b5..00000000
--- a/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import * as React from 'react';
-import { Link } from 'react-router';
-import { provide } from 'redux-typed';
-import { ApplicationState } from '../../store';
-import * as GenreDetailsStore from '../../store/GenreDetails';
-import { AlbumTile } from './AlbumTile';
-
-interface RouteParams {
- genreId: string
-}
-
-class GenreDetails extends React.Component {
- componentWillMount() {
- this.props.requestGenreDetails(parseInt(this.props.params.genreId));
- }
-
- componentWillReceiveProps(nextProps: GenreDetailsProps) {
- this.props.requestGenreDetails(parseInt(nextProps.params.genreId));
- }
-
- public render() {
- if (this.props.isLoaded) {
- return
-
Albums
-
-
- {this.props.albums.map(album =>
-
- )}
-
-
;
- } else {
- return
Loading...
;
- }
- }
-}
-
-// Selects which part of global state maps to this component, and defines a type for the resulting props
-const provider = provide(
- (state: ApplicationState) => state.genreDetails,
- GenreDetailsStore.actionCreators
-).withExternalProps<{ params: RouteParams }>();
-
-type GenreDetailsProps = typeof provider.allProps;
-export default provider.connect(GenreDetails);
diff --git a/samples/react/MusicStore/ReactApp/components/public/Genres.tsx b/samples/react/MusicStore/ReactApp/components/public/Genres.tsx
deleted file mode 100644
index 1e03789b..00000000
--- a/samples/react/MusicStore/ReactApp/components/public/Genres.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import * as React from 'react';
-import { Link } from 'react-router';
-import { provide } from 'redux-typed';
-import { ApplicationState } from '../../store';
-import * as GenreList from '../../store/GenreList';
-
-class Genres extends React.Component {
- componentWillMount() {
- this.props.requestGenresList();
- }
-
- public render() {
- const { genres } = this.props;
- return
-
Browse Genres
-
-
Select from { this.props.isLoaded ? genres.length : '...' } genres:
-
-
- {genres.map(genre =>
-
-
- { genre.Name }
-
-
- )}
-
-
;
- }
-}
-
-// Selects which part of global state maps to this component, and defines a type for the resulting props
-const provider = provide(
- (state: ApplicationState) => state.genreList,
- GenreList.actionCreators
-);
-type GenresProps = typeof provider.allProps;
-export default provider.connect(Genres);
diff --git a/samples/react/MusicStore/ReactApp/components/public/Home.tsx b/samples/react/MusicStore/ReactApp/components/public/Home.tsx
deleted file mode 100644
index b0f03d80..00000000
--- a/samples/react/MusicStore/ReactApp/components/public/Home.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import * as React from 'react';
-import { Link } from 'react-router';
-import { provide } from 'redux-typed';
-import { ApplicationState } from '../../store';
-import { actionCreators } from '../../store/FeaturedAlbums';
-import { AlbumTile } from './AlbumTile';
-
-class Home extends React.Component {
- componentWillMount() {
- this.props.requestFeaturedAlbums();
- }
-
- public render() {
- return
-
-
MVC Music Store
-
-
-
- {this.props.albums.map(album =>
-
- )}
-
-
;
- }
-}
-
-// Selects which part of global state maps to this component, and defines a type for the resulting props
-const provider = provide(
- (state: ApplicationState) => state.featuredAlbums,
- actionCreators
-);
-type HomeProps = typeof provider.allProps;
-export default provider.connect(Home);
diff --git a/samples/react/MusicStore/ReactApp/configureStore.ts b/samples/react/MusicStore/ReactApp/configureStore.ts
deleted file mode 100644
index 9274c22b..00000000
--- a/samples/react/MusicStore/ReactApp/configureStore.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
-import * as thunkModule from 'redux-thunk';
-import { syncHistory, routeReducer } from 'react-router-redux';
-import * as Store from './store';
-import { typedToPlain } from 'redux-typed';
-
-export default function configureStore(history: HistoryModule.History, initialState?: Store.ApplicationState) {
- // Build middleware
- const thunk = (thunkModule as any).default; // Workaround for TypeScript not importing thunk module as expected
- const reduxRouterMiddleware = syncHistory(history);
- const middlewares = [thunk, reduxRouterMiddleware, typedToPlain];
- const devToolsExtension = null;//(window as any).devToolsExtension; // If devTools is installed, connect to it
-
- const finalCreateStore = compose(
- applyMiddleware(...middlewares),
- devToolsExtension ? devToolsExtension() : f => f
- )(createStore)
-
- // Combine all reducers
- const allReducers = buildRootReducer(Store.reducers);
-
- const store = finalCreateStore(allReducers, initialState) as Redux.Store;
-
- // Required for replaying actions from devtools to work
- reduxRouterMiddleware.listenForReplays(store);
-
- // Enable Webpack hot module replacement for reducers
- if (module.hot) {
- module.hot.accept('./store', () => {
- const nextRootReducer = require('./store');
- store.replaceReducer(buildRootReducer(nextRootReducer.reducers));
- });
- }
-
- return store;
-}
-
-function buildRootReducer(allReducers) {
- return combineReducers(Object.assign({}, allReducers, { routing: routeReducer })) as Redux.Reducer;
-}
diff --git a/samples/react/MusicStore/ReactApp/routes.tsx b/samples/react/MusicStore/ReactApp/routes.tsx
deleted file mode 100644
index bf4f5fca..00000000
--- a/samples/react/MusicStore/ReactApp/routes.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import * as React from 'react';
-import { Router, Route, HistoryBase } from 'react-router';
-import NavMenu from './components/NavMenu';
-import Home from './components/public/Home';
-import Genres from './components/public/Genres';
-import GenreDetails from './components/public/GenreDetails';
-import AlbumDetails from './components/public/AlbumDetails';
-
-class Layout extends React.Component<{ body: React.ReactElement }, void> {
- public render() {
- return
-
-
- { this.props.body }
-
-
;
- }
-}
-
-export const routes =
-
-
-
-
-;
diff --git a/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts b/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts
deleted file mode 100644
index ad3f458e..00000000
--- a/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-import { fetch, addTask } from 'domain-task';
-import { typeName, isActionType, Action, Reducer } from 'redux-typed';
-import { ActionCreator } from './';
-import { Genre } from './GenreList';
-
-// -----------------
-// STATE - This defines the type of data maintained in the Redux store.
-
-export interface AlbumDetailsState {
- album: AlbumDetails;
- requestedAlbumId: number;
-}
-
-export interface AlbumDetails {
- AlbumId: number;
- Title: string;
- AlbumArtUrl: string;
- Genre: Genre;
- Artist: Artist;
- Price: number;
-}
-
-interface Artist {
- Name: string;
-}
-
-// -----------------
-// ACTIONS - These are serializable (hence replayable) descriptions of state transitions.
-// They do not themselves have any side-effects; they just describe something that is going to happen.
-// Use @typeName and isActionType for type detection that works even after serialization/deserialization.
-
-@typeName("REQUEST_ALBUM_DETAILS")
-class RequestAlbumDetails extends Action {
- constructor(public albumId: number) {
- super();
- }
-}
-
-@typeName("RECEIVE_ALBUM_DETAILS")
-class ReceiveAlbumDetails extends Action {
- constructor(public album: AlbumDetails) {
- super();
- }
-}
-
-// ----------------
-// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.
-// They don't directly mutate state, but they can have external side-effects (such as loading data).
-
-export const actionCreators = {
- requestAlbumDetails: (albumId: number): ActionCreator => (dispatch, getState) => {
- // Only load if it's not already loaded (or currently being loaded)
- if (albumId !== getState().albumDetails.requestedAlbumId) {
- let fetchTask = fetch(`/api/albums/${ albumId }`)
- .then(results => results.json())
- .then(album => {
- // Only replace state if it's still the most recent request
- if (albumId === getState().albumDetails.requestedAlbumId) {
- dispatch(new ReceiveAlbumDetails(album));
- }
- });
-
- addTask(fetchTask); // Ensure server-side prerendering waits for this to complete
- dispatch(new RequestAlbumDetails(albumId));
- }
- }
-};
-
-// ----------------
-// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.
-// For unrecognized actions, must return the existing state (or default initial state if none was supplied).
-const unloadedState: AlbumDetailsState = { requestedAlbumId: null as number, album: null };
-export const reducer: Reducer = (state, action) => {
- if (isActionType(action, RequestAlbumDetails)) {
- return { requestedAlbumId: action.albumId, album: null };
- } else if (isActionType(action, ReceiveAlbumDetails)) {
- return { requestedAlbumId: action.album.AlbumId, album: action.album };
- } else {
- return state || unloadedState;
- }
-};
diff --git a/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts b/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts
deleted file mode 100644
index f9e78282..00000000
--- a/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { fetch, addTask } from 'domain-task';
-import { typeName, isActionType, Action, Reducer } from 'redux-typed';
-import { ActionCreator } from './';
-
-// -----------------
-// STATE - This defines the type of data maintained in the Redux store.
-
-export interface FeaturedAlbumsState {
- albums: Album[];
- isLoaded: boolean;
-}
-
-export interface Album {
- AlbumId: number;
- Title: string;
- AlbumArtUrl: string;
-}
-
-// -----------------
-// ACTIONS - These are serializable (hence replayable) descriptions of state transitions.
-// They do not themselves have any side-effects; they just describe something that is going to happen.
-// Use @typeName and isActionType for type detection that works even after serialization/deserialization.
-
-@typeName("REQUEST_FEATURED_ALBUMS")
-class RequestFeaturedAlbums extends Action {
-}
-
-@typeName("RECEIVE_FEATURED_ALBUMS")
-class ReceiveFeaturedAlbums extends Action {
- constructor(public albums: Album[]) {
- super();
- }
-}
-
-// ----------------
-// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.
-// They don't directly mutate state, but they can have external side-effects (such as loading data).
-
-export const actionCreators = {
- requestFeaturedAlbums: (): ActionCreator => (dispatch, getState) => {
- if (!getState().featuredAlbums.isLoaded) {
- let fetchTask = fetch('https://github.com/api/albums/mostPopular')
- .then(results => results.json())
- .then(albums => dispatch(new ReceiveFeaturedAlbums(albums)));
-
- addTask(fetchTask); // Ensure server-side prerendering waits for this to complete
- return dispatch(new RequestFeaturedAlbums());
- }
- }
-};
-
-// ----------------
-// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.
-// For unrecognized actions, must return the existing state (or default initial state if none was supplied).
-
-export const reducer: Reducer = (state, action) => {
- if (isActionType(action, ReceiveFeaturedAlbums)) {
- return { albums: action.albums, isLoaded: true };
- } else {
- return state || { albums: [], isLoaded: false };
- }
-};
diff --git a/samples/react/MusicStore/ReactApp/store/GenreDetails.ts b/samples/react/MusicStore/ReactApp/store/GenreDetails.ts
deleted file mode 100644
index 24848a10..00000000
--- a/samples/react/MusicStore/ReactApp/store/GenreDetails.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { fetch, addTask } from 'domain-task';
-import { typeName, isActionType, Action, Reducer } from 'redux-typed';
-import { ActionCreator } from './';
-import { Album } from './FeaturedAlbums';
-
-// -----------------
-// STATE - This defines the type of data maintained in the Redux store.
-
-export interface GenreDetailsState {
- requestedGenreId: number;
- albums: Album[];
- isLoaded: boolean;
-}
-
-// -----------------
-// ACTIONS - These are serializable (hence replayable) descriptions of state transitions.
-// They do not themselves have any side-effects; they just describe something that is going to happen.
-// Use @typeName and isActionType for type detection that works even after serialization/deserialization.
-
-@typeName("REQUEST_GENRE_DETAILS")
-class RequestGenreDetails extends Action {
- constructor(public genreId: number) {
- super();
- }
-}
-
-@typeName("RECEIVE_GENRE_DETAILS")
-class ReceiveGenreDetails extends Action {
- constructor(public genreId: number, public albums: Album[]) {
- super();
- }
-}
-
-// ----------------
-// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.
-// They don't directly mutate state, but they can have external side-effects (such as loading data).
-
-export const actionCreators = {
- requestGenreDetails: (genreId: number): ActionCreator => (dispatch, getState) => {
- // Only load if it's not already loaded (or currently being loaded)
- if (genreId !== getState().genreDetails.requestedGenreId) {
- let fetchTask = fetch(`/api/genres/${ genreId }/albums`)
- .then(results => results.json())
- .then(albums => {
- // Only replace state if it's still the most recent request
- if (genreId === getState().genreDetails.requestedGenreId) {
- dispatch(new ReceiveGenreDetails(genreId, albums));
- }
- });
-
- addTask(fetchTask); // Ensure server-side prerendering waits for this to complete
- dispatch(new RequestGenreDetails(genreId));
- }
- }
-};
-
-// ----------------
-// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.
-// For unrecognized actions, must return the existing state (or default initial state if none was supplied).
-export const reducer: Reducer = (state, action) => {
- if (isActionType(action, RequestGenreDetails)) {
- return { requestedGenreId: action.genreId, albums: [], isLoaded: false };
- } else if (isActionType(action, ReceiveGenreDetails)) {
- return { requestedGenreId: action.genreId, albums: action.albums, isLoaded: true };
- } else {
- return state || { requestedGenreId: null as number, albums: [], isLoaded: false };
- }
-};
diff --git a/samples/react/MusicStore/ReactApp/store/GenreList.ts b/samples/react/MusicStore/ReactApp/store/GenreList.ts
deleted file mode 100644
index 8843f22e..00000000
--- a/samples/react/MusicStore/ReactApp/store/GenreList.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { fetch, addTask } from 'domain-task';
-import { typeName, isActionType, Action, Reducer } from 'redux-typed';
-import { ActionCreator } from './';
-
-// -----------------
-// STATE - This defines the type of data maintained in the Redux store.
-
-export interface GenresListState {
- genres: Genre[];
- isLoaded: boolean;
-}
-
-export interface Genre {
- GenreId: string;
- Name: string;
-}
-
-// -----------------
-// ACTIONS - These are serializable (hence replayable) descriptions of state transitions.
-// They do not themselves have any side-effects; they just describe something that is going to happen.
-// Use @typeName and isActionType for type detection that works even after serialization/deserialization.
-
-@typeName("RECEIVE_GENRES_LIST")
-class ReceiveGenresList extends Action {
- constructor(public genres: Genre[]) {
- super();
- }
-}
-
-// ----------------
-// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.
-// They don't directly mutate state, but they can have external side-effects (such as loading data).
-
-export const actionCreators = {
- requestGenresList: (): ActionCreator => (dispatch, getState) => {
- if (!getState().genreList.isLoaded) {
- let fetchTask = fetch('https://github.com/api/genres')
- .then(results => results.json())
- .then(genres => dispatch(new ReceiveGenresList(genres)));
- addTask(fetchTask); // Ensure server-side prerendering waits for this to complete
- }
- }
-};
-
-// ----------------
-// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.
-// For unrecognized actions, must return the existing state (or default initial state if none was supplied).
-
-export const reducer: Reducer = (state, action) => {
- if (isActionType(action, ReceiveGenresList)) {
- return { genres: action.genres, isLoaded: true };
- } else {
- return state || { genres: [], isLoaded: false };
- }
-};
diff --git a/samples/react/MusicStore/ReactApp/store/index.ts b/samples/react/MusicStore/ReactApp/store/index.ts
deleted file mode 100644
index 50f6178c..00000000
--- a/samples/react/MusicStore/ReactApp/store/index.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { ActionCreatorGeneric } from 'redux-typed';
-import * as FeaturedAlbums from './FeaturedAlbums';
-import * as GenreList from './GenreList';
-import * as GenreDetails from './GenreDetails';
-import * as AlbumDetails from './AlbumDetails';
-
-// The top-level state object
-export interface ApplicationState {
- featuredAlbums: FeaturedAlbums.FeaturedAlbumsState;
- genreList: GenreList.GenresListState,
- genreDetails: GenreDetails.GenreDetailsState,
- albumDetails: AlbumDetails.AlbumDetailsState
-}
-
-// Whenever an action is dispatched, Redux will update each top-level application state property using
-// the reducer with the matching name. It's important that the names match exactly, and that the reducer
-// acts on the corresponding ApplicationState property type.
-export const reducers = {
- featuredAlbums: FeaturedAlbums.reducer,
- genreList: GenreList.reducer,
- genreDetails: GenreDetails.reducer,
- albumDetails: AlbumDetails.reducer
-};
-
-// This type can be used as a hint on action creators so that its 'dispatch' and 'getState' params are
-// correctly typed to match your store.
-export type ActionCreator = ActionCreatorGeneric;
diff --git a/samples/react/MusicStore/ReactApp/styles/styles.css b/samples/react/MusicStore/ReactApp/styles/styles.css
deleted file mode 100644
index a8fc8a14..00000000
--- a/samples/react/MusicStore/ReactApp/styles/styles.css
+++ /dev/null
@@ -1,3 +0,0 @@
-body {
- padding-top: 50px;
-}
diff --git a/samples/react/MusicStore/SiteSettings.cs b/samples/react/MusicStore/SiteSettings.cs
deleted file mode 100644
index 50a86c24..00000000
--- a/samples/react/MusicStore/SiteSettings.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace MusicStore
-{
- public class SiteSettings
- {
- public string DefaultAdminUsername { get; set; }
- public string DefaultAdminPassword { get; set; }
- }
-}
diff --git a/samples/react/MusicStore/Startup.cs b/samples/react/MusicStore/Startup.cs
deleted file mode 100755
index 1bc6003d..00000000
--- a/samples/react/MusicStore/Startup.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
-using Microsoft.AspNetCore.SpaServices.Webpack;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Logging;
-using Microsoft.Extensions.PlatformAbstractions;
-using AutoMapper;
-using MusicStore.Apis;
-using MusicStore.Models;
-using Newtonsoft.Json.Serialization;
-
-namespace MusicStore
-{
- public class Startup
- {
- // This method gets called by the runtime. Use this method to add services to the container.
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddMvc().AddJsonOptions(options =>
- {
- options.SerializerSettings.ContractResolver = null;
- });
-
- // Add EF services to the service container
- services.AddEntityFramework()
- .AddEntityFrameworkSqlite()
- .AddDbContext(options => {
- options.UseSqlite("Data Source=music-db.sqlite");
- });
-
- // Add Identity services to the services container
- services.AddIdentity()
- .AddEntityFrameworkStores()
- .AddDefaultTokenProviders();
-
- // Configure Auth
- services.Configure(options =>
- {
- options.AddPolicy("app-ManageStore", new AuthorizationPolicyBuilder().RequireClaim("app-ManageStore", "Allowed").Build());
- });
-
- Mapper.Initialize(cfg =>
- {
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- cfg.CreateMap();
- });
- }
-
- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
- public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostingEnvironment env)
- {
- app.UseDeveloperExceptionPage();
-
- // Initialize the sample data
- SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait();
-
- // In dev mode, the JS/TS/etc is compiled and served dynamically and supports hot replacement.
- // In production, we assume you've used webpack to emit the prebuilt content to disk.
- if (env.IsDevelopment()) {
- app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions {
- HotModuleReplacement = true,
- ReactHotModuleReplacement = true
- });
- }
-
- app.UseStaticFiles();
- loggerFactory.AddConsole();
-
- // Add MVC to the request pipeline.
- app.UseMvc(routes =>
- {
- // Matches requests that correspond to an existent controller/action pair
- routes.MapRoute(
- name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
-
- // Matches any other request that doesn't appear to have a filename extension (defined as 'having a dot in the last URI segment').
- // This means you'll correctly get 404s for /some/dir/non-existent-image.png instead of returning the SPA HTML.
- // However, it means requests like /customers/isaac.newton will *not* be mapped into the SPA, so if you need to accept
- // URIs like that you'll need to match all URIs, e.g.:
- // routes.MapRoute("spa-fallback", "{*anything}", new { controller = "Home", action = "Index" });
- // (which of course will match /customers/isaac.png too, so in that case it would serve the PNG image at that URL if one is on disk,
- // or the SPA HTML if not).
- routes.MapSpaFallbackRoute("spa-fallback", new { controller = "Home", action = "Index" });
- });
- }
-
- public static void Main(string[] args)
- {
- var host = new WebHostBuilder()
- .UseContentRoot(Directory.GetCurrentDirectory())
- .UseIISIntegration()
- .UseKestrel()
- .UseStartup()
- .Build();
-
- host.Run();
- }
- }
-}
diff --git a/samples/react/MusicStore/Views/Home/Index.cshtml b/samples/react/MusicStore/Views/Home/Index.cshtml
deleted file mode 100755
index 9595e016..00000000
--- a/samples/react/MusicStore/Views/Home/Index.cshtml
+++ /dev/null
@@ -1,11 +0,0 @@
-@{
- ViewData["Title"] = "Home Page";
-}
-
-
-
-@section scripts {
-
-
-}
diff --git a/samples/react/MusicStore/Views/Shared/Error.cshtml b/samples/react/MusicStore/Views/Shared/Error.cshtml
deleted file mode 100755
index 473b35d6..00000000
--- a/samples/react/MusicStore/Views/Shared/Error.cshtml
+++ /dev/null
@@ -1,6 +0,0 @@
-@{
- ViewData["Title"] = "Error";
-}
-
-