Initial commit.

- Added original music store and k10 and net45 versions with new framework.
This commit is contained in:
David Fowler 2014-01-28 02:27:26 -08:00
commit 53268f3c9e
122 changed files with 35619 additions and 0 deletions

50
.gitattributes vendored Normal file
View File

@ -0,0 +1,50 @@
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.jpg binary
*.png binary
*.gif binary
*.cs text=auto diff=csharp
*.vb text=auto
*.resx text=auto
*.c text=auto
*.cpp text=auto
*.cxx text=auto
*.h text=auto
*.hxx text=auto
*.py text=auto
*.rb text=auto
*.java text=auto
*.html text=auto
*.htm text=auto
*.css text=auto
*.scss text=auto
*.sass text=auto
*.less text=auto
*.js text=auto
*.lisp text=auto
*.clj text=auto
*.sql text=auto
*.php text=auto
*.lua text=auto
*.m text=auto
*.asm text=auto
*.erl text=auto
*.fs text=auto
*.fsx text=auto
*.hs text=auto
*.csproj text=auto
*.vbproj text=auto
*.fsproj text=auto
*.dbproj text=auto
*.sln text=auto eol=crlf

32
.gitignore vendored Normal file
View File

@ -0,0 +1,32 @@
[Oo]bj/
[Bb]in/
*.xap
*.user
/TestResults
*.vspscc
*.vssscc
*.suo
*.cache
*.docstates
_ReSharper.*
*.csproj.user
*[Rr]e[Ss]harper.user
_ReSharper.*/
packages/*
artifacts/*
msbuild.log
PublishProfiles/
*.psess
*.vsp
*.pidb
*.userprefs
*DS_Store
*.ncrunchsolution
*.log
*.vspx
/.symbols
nuget.exe
build/
*net45.csproj
*k10.csproj
App_Data/

4
.nuget/packages.config Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Sake" version="0.2" />
</packages>

34
MusicStore.sln Normal file
View File

@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcMusicStore", "src\MvcMusicStore\MvcMusicStore.csproj", "{25CE8290-EF24-4818-B009-68DC903163D3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MusicStore.k10", "src\MusicStore\MusicStore.k10.csproj", "{ABF101EC-78C3-4D90-BBEC-D69C182B1F7D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MusicStore.net45", "src\MusicStore\MusicStore.net45.csproj", "{9C8A2D1F-D430-46DF-8F00-39E378EC8FB2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{25CE8290-EF24-4818-B009-68DC903163D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25CE8290-EF24-4818-B009-68DC903163D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25CE8290-EF24-4818-B009-68DC903163D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25CE8290-EF24-4818-B009-68DC903163D3}.Release|Any CPU.Build.0 = Release|Any CPU
{ABF101EC-78C3-4D90-BBEC-D69C182B1F7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ABF101EC-78C3-4D90-BBEC-D69C182B1F7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ABF101EC-78C3-4D90-BBEC-D69C182B1F7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ABF101EC-78C3-4D90-BBEC-D69C182B1F7D}.Release|Any CPU.Build.0 = Release|Any CPU
{9C8A2D1F-D430-46DF-8F00-39E378EC8FB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C8A2D1F-D430-46DF-8F00-39E378EC8FB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C8A2D1F-D430-46DF-8F00-39E378EC8FB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C8A2D1F-D430-46DF-8F00-39E378EC8FB2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

13
NuGet.Config Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/" />
<add key="NuGet.org" value="https://nuget.org/api/v2/" />
</packageSources>
<packageSourceCredentials>
<AspNetVNext>
<add key="Username" value="aspnetreadonly" />
<add key="ClearTextPassword" value="4d8a2d9c-7b80-4162-9978-47e918c9658c" />
</AspNetVNext>
</packageSourceCredentials>
</configuration>

16
build.cmd Normal file
View File

@ -0,0 +1,16 @@
@echo off
cd %~dp0
IF EXIST .nuget\NuGet.exe goto restore
echo Downloading latest version of NuGet.exe...
md .nuget
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '.nuget\NuGet.exe'"
:restore
IF EXIST build goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
xcopy packages\KoreBuild\build build\ /Y
.nuget\NuGet.exe install Sake -version 0.2 -o packages
:run
packages\Sake.0.2\tools\Sake.exe -I build -f makefile.shade %*

7
makefile.shade Normal file
View File

@ -0,0 +1,7 @@
var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='Microsoft'
use-standard-lifecycle
k-standard-goals

View File

@ -0,0 +1,425 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Security.Claims;
//using System.Threading.Tasks;
//using System.Web;
//using System.Web.Mvc;
//using Microsoft.AspNet.Identity;
//using Microsoft.AspNet.Identity.EntityFramework;
//using Microsoft.AspNet.Mvc;
//using Microsoft.Owin.Security;
//using MvcMusicStore.Models;
//namespace MvcMusicStore.Controllers
//{
// [Authorize]
// public class AccountController : Controller
// {
// public AccountController()
// : this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext())))
// {
// }
// public AccountController(UserManager<ApplicationUser> userManager)
// {
// UserManager = userManager;
// }
// public UserManager<ApplicationUser> UserManager { get; private set; }
// private void MigrateShoppingCart(string UserName)
// {
// var storeDb = new MusicStoreEntities();
// // Associate shopping cart items with logged-in user
// var cart = ShoppingCart.GetCart(storeDb, this.HttpContext);
// cart.MigrateCart(UserName);
// storeDb.SaveChanges();
// Session[ShoppingCart.CartSessionKey] = UserName;
// }
// //
// // GET: /Account/Login
// [AllowAnonymous]
// public IActionResult Login(string returnUrl)
// {
// ViewBag.ReturnUrl = returnUrl;
// return View();
// }
// //
// // POST: /Account/Login
// [HttpPost]
// [AllowAnonymous]
// [ValidateAntiForgeryToken]
// public async Task<IActionResult> Login(LoginViewModel model, string returnUrl)
// {
// if (ModelState.IsValid)
// {
// var user = await UserManager.FindAsync(model.UserName, model.Password);
// if (user != null)
// {
// await SignInAsync(user, model.RememberMe);
// return RedirectToLocal(returnUrl);
// }
// else
// {
// ModelState.AddModelError("", "Invalid username or password.");
// }
// }
// // If we got this far, something failed, redisplay form
// return View(model);
// }
// //
// // GET: /Account/Register
// [AllowAnonymous]
// public IActionResult Register()
// {
// return View();
// }
// //
// // POST: /Account/Register
// [HttpPost]
// [AllowAnonymous]
// [ValidateAntiForgeryToken]
// public async Task<IActionResult> Register(RegisterViewModel model)
// {
// if (ModelState.IsValid)
// {
// var user = new ApplicationUser() { UserName = model.UserName };
// var result = await UserManager.CreateAsync(user, model.Password);
// if (result.Succeeded)
// {
// await SignInAsync(user, isPersistent: false);
// return RedirectToAction("Index", "Home");
// }
// else
// {
// AddErrors(result);
// }
// }
// // If we got this far, something failed, redisplay form
// return View(model);
// }
// //
// // POST: /Account/Disassociate
// [HttpPost]
// [ValidateAntiForgeryToken]
// public async Task<IActionResult> Disassociate(string loginProvider, string providerKey)
// {
// ManageMessageId? message = null;
// IdentityResult result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
// if (result.Succeeded)
// {
// message = ManageMessageId.RemoveLoginSuccess;
// }
// else
// {
// message = ManageMessageId.Error;
// }
// return RedirectToAction("Manage", new { Message = message });
// }
// //
// // GET: /Account/Manage
// public IActionResult Manage(ManageMessageId? message)
// {
// ViewBag.StatusMessage =
// message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed."
// : message == ManageMessageId.SetPasswordSuccess ? "Your password has been set."
// : message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed."
// : message == ManageMessageId.Error ? "An error has occurred."
// : "";
// ViewBag.HasLocalPassword = HasPassword();
// ViewBag.ReturnUrl = Url.Action("Manage");
// return View();
// }
// //
// // POST: /Account/Manage
// [HttpPost]
// [ValidateAntiForgeryToken]
// public async Task<IActionResult> Manage(ManageUserViewModel model)
// {
// bool hasPassword = HasPassword();
// ViewBag.HasLocalPassword = hasPassword;
// ViewBag.ReturnUrl = Url.Action("Manage");
// if (hasPassword)
// {
// if (ModelState.IsValid)
// {
// IdentityResult result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.OldPassword, model.NewPassword);
// if (result.Succeeded)
// {
// return RedirectToAction("Manage", new { Message = ManageMessageId.ChangePasswordSuccess });
// }
// else
// {
// AddErrors(result);
// }
// }
// }
// else
// {
// // User does not have a password so remove any validation errors caused by a missing OldPassword field
// ModelState state = ModelState["OldPassword"];
// if (state != null)
// {
// state.Errors.Clear();
// }
// if (ModelState.IsValid)
// {
// IdentityResult result = await UserManager.AddPasswordAsync(User.Identity.GetUserId(), model.NewPassword);
// if (result.Succeeded)
// {
// return RedirectToAction("Manage", new { Message = ManageMessageId.SetPasswordSuccess });
// }
// else
// {
// AddErrors(result);
// }
// }
// }
// // If we got this far, something failed, redisplay form
// return View(model);
// }
// //
// // POST: /Account/ExternalLogin
// [HttpPost]
// [AllowAnonymous]
// [ValidateAntiForgeryToken]
// public IActionResult ExternalLogin(string provider, string returnUrl)
// {
// // Request a redirect to the external login provider
// return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl }));
// }
// //
// // GET: /Account/ExternalLoginCallback
// [AllowAnonymous]
// public async Task<IActionResult> ExternalLoginCallback(string returnUrl)
// {
// var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
// if (loginInfo == null)
// {
// return RedirectToAction("Login");
// }
// // Sign in the user with this external login provider if the user already has a login
// var user = await UserManager.FindAsync(loginInfo.Login);
// if (user != null)
// {
// await SignInAsync(user, isPersistent: false);
// return RedirectToLocal(returnUrl);
// }
// else
// {
// // If the user does not have an account, then prompt the user to create an account
// ViewBag.ReturnUrl = returnUrl;
// ViewBag.LoginProvider = loginInfo.Login.LoginProvider;
// return View("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { UserName = loginInfo.DefaultUserName });
// }
// }
// //
// // POST: /Account/LinkLogin
// [HttpPost]
// [ValidateAntiForgeryToken]
// public IActionResult LinkLogin(string provider)
// {
// // Request a redirect to the external login provider to link a login for the current user
// return new ChallengeResult(provider, Url.Action("LinkLoginCallback", "Account"), User.Identity.GetUserId());
// }
// //
// // GET: /Account/LinkLoginCallback
// public async Task<IActionResult> LinkLoginCallback()
// {
// var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(XsrfKey, User.Identity.GetUserId());
// if (loginInfo == null)
// {
// return RedirectToAction("Manage", new { Message = ManageMessageId.Error });
// }
// var result = await UserManager.AddLoginAsync(User.Identity.GetUserId(), loginInfo.Login);
// if (result.Succeeded)
// {
// return RedirectToAction("Manage");
// }
// return RedirectToAction("Manage", new { Message = ManageMessageId.Error });
// }
// //
// // POST: /Account/ExternalLoginConfirmation
// [HttpPost]
// [AllowAnonymous]
// [ValidateAntiForgeryToken]
// public async Task<IActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl)
// {
// if (User.Identity.IsAuthenticated)
// {
// return RedirectToAction("Manage");
// }
// if (ModelState.IsValid)
// {
// // Get the information about the user from the external login provider
// var info = await AuthenticationManager.GetExternalLoginInfoAsync();
// if (info == null)
// {
// return View("ExternalLoginFailure");
// }
// var user = new ApplicationUser() { UserName = model.UserName };
// var result = await UserManager.CreateAsync(user);
// if (result.Succeeded)
// {
// result = await UserManager.AddLoginAsync(user.Id, info.Login);
// if (result.Succeeded)
// {
// await SignInAsync(user, isPersistent: false);
// return RedirectToLocal(returnUrl);
// }
// }
// AddErrors(result);
// }
// ViewBag.ReturnUrl = returnUrl;
// return View(model);
// }
// //
// // POST: /Account/LogOff
// [HttpPost]
// [ValidateAntiForgeryToken]
// public IActionResult LogOff()
// {
// AuthenticationManager.SignOut();
// return RedirectToAction("Index", "Home");
// }
// //
// // GET: /Account/ExternalLoginFailure
// [AllowAnonymous]
// public IActionResult ExternalLoginFailure()
// {
// return View();
// }
// [ChildActionOnly]
// public IActionResult RemoveAccountList()
// {
// var linkedAccounts = UserManager.GetLogins(User.Identity.GetUserId());
// ViewBag.ShowRemoveButton = HasPassword() || linkedAccounts.Count > 1;
// return (IActionResult)PartialView("_RemoveAccountPartial", linkedAccounts);
// }
// protected override void Dispose(bool disposing)
// {
// if (disposing && UserManager != null)
// {
// UserManager.Dispose();
// UserManager = null;
// }
// base.Dispose(disposing);
// }
// #region Helpers
// // Used for XSRF protection when adding external logins
// private const string XsrfKey = "XsrfId";
// private IAuthenticationManager AuthenticationManager
// {
// get
// {
// return HttpContext.GetOwinContext().Authentication;
// }
// }
// private async Task SignInAsync(ApplicationUser user, bool isPersistent)
// {
// AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
// var identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
// AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity);
// // Migrate the user's shopping cart
// MigrateShoppingCart(user.UserName);
// }
// private void AddErrors(IdentityResult result)
// {
// foreach (var error in result.Errors)
// {
// ModelState.AddModelError("", error);
// }
// }
// private bool HasPassword()
// {
// var user = UserManager.FindById(User.Identity.GetUserId());
// if (user != null)
// {
// return user.PasswordHash != null;
// }
// return false;
// }
// public enum ManageMessageId
// {
// ChangePasswordSuccess,
// SetPasswordSuccess,
// RemoveLoginSuccess,
// Error
// }
// private IActionResult RedirectToLocal(string returnUrl)
// {
// if (Url.IsLocalUrl(returnUrl))
// {
// return Redirect(returnUrl);
// }
// else
// {
// return RedirectToAction("Index", "Home");
// }
// }
// private class ChallengeResult : HttpUnauthorizedResult
// {
// public ChallengeResult(string provider, string redirectUri)
// : this(provider, redirectUri, null)
// {
// }
// public ChallengeResult(string provider, string redirectUri, string userId)
// {
// LoginProvider = provider;
// RedirectUri = redirectUri;
// UserId = userId;
// }
// public string LoginProvider { get; set; }
// public string RedirectUri { get; set; }
// public string UserId { get; set; }
// public override void ExecuteResult(ControllerContext context)
// {
// var properties = new AuthenticationProperties() { RedirectUri = RedirectUri };
// if (UserId != null)
// {
// properties.Dictionary[XsrfKey] = UserId;
// }
// context.HttpContext.GetOwinContext().Authentication.Challenge(properties, LoginProvider);
// }
// }
// #endregion
// }
//}

View File

@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Mvc;
using MvcMusicStore.Models;
namespace MvcMusicStore.Controllers
{
// [Authorize]
public class CheckoutController : Controller
{
MusicStoreEntities storeDB = new MusicStoreEntities();
const string PromoCode = "FREE";
//
// GET: /Checkout/
public IActionResult AddressAndPayment()
{
return View();
}
//
// POST: /Checkout/AddressAndPayment
// [HttpPost]
public IActionResult AddressAndPayment(IDictionary<string, string> values /*FormCollection values*/)
{
var order = new Order();
// TryUpdateModel(order);
try
{
if (string.Equals(values["PromoCode"], PromoCode,
StringComparison.OrdinalIgnoreCase) == false)
{
return View(order);
}
else
{
// order.Username = User.Identity.Name;
order.OrderDate = DateTime.Now;
//Add the Order
storeDB.Orders.Add(order);
//Process the order
var cart = ShoppingCart.GetCart(storeDB, this.Context);
cart.CreateOrder(order);
// Save all changes
storeDB.SaveChanges();
//return RedirectToAction("Complete",
// new { id = order.OrderId });
return null;
}
}
catch
{
//Invalid - redisplay with errors
return View(order);
}
}
//
// GET: /Checkout/Complete
public IActionResult Complete(int id)
{
// Validate customer owns this order
bool isValid = storeDB.Orders.Any(
o => o.OrderId == id &&
o.Username == /*User.Identity.Name*/ null);
if (isValid)
{
return View(id);
}
else
{
return View("Error");
}
}
}
}

View File

@ -0,0 +1,34 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Mvc;
using MvcMusicStore.Models;
namespace MvcMusicStore.Controllers
{
public class HomeController : Controller
{
private MusicStoreEntities storeDB = new MusicStoreEntities();
//
// GET: /Home/
public IActionResult Index()
{
// Get most popular albums
var albums = GetTopSellingAlbums(6);
return View(albums);
}
private List<Album> GetTopSellingAlbums(int count)
{
// Group the order details by album and return
// the albums with the highest count
return storeDB.Albums
.OrderByDescending(a => a.OrderDetails.Count())
.Take(count)
.ToList();
}
}
}

View File

@ -0,0 +1,103 @@
using System.Linq;
using Microsoft.AspNet.Mvc;
using MvcMusicStore.Models;
using MvcMusicStore.ViewModels;
namespace MvcMusicStore.Controllers
{
public class ShoppingCartController : Controller
{
MusicStoreEntities storeDB = new MusicStoreEntities();
//
// GET: /ShoppingCart/
public IActionResult Index()
{
var cart = ShoppingCart.GetCart(storeDB, this.Context);
// Set up our ViewModel
var viewModel = new ShoppingCartViewModel
{
CartItems = cart.GetCartItems(),
CartTotal = cart.GetTotal()
};
// Return the view
return View(viewModel);
}
//
// GET: /ShoppingCart/AddToCart/5
public IActionResult AddToCart(int id)
{
// Retrieve the album from the database
var addedAlbum = storeDB.Albums
.Single(album => album.AlbumId == id);
// Add it to the shopping cart
var cart = ShoppingCart.GetCart(storeDB, this.Context);
cart.AddToCart(addedAlbum);
storeDB.SaveChanges();
// Go back to the main store page for more shopping
// return RedirectToAction("Index");
return null;
}
//
// AJAX: /ShoppingCart/RemoveFromCart/5
// [HttpPost]
public IActionResult RemoveFromCart(int id)
{
// Retrieve the current user's shopping cart
var cart = ShoppingCart.GetCart(storeDB, this.Context);
// Get the name of the album to display confirmation
string albumName = storeDB.Carts
.Single(item => item.RecordId == id).Album.Title;
// Remove from cart
int itemCount = cart.RemoveFromCart(id);
storeDB.SaveChanges();
string removed = (itemCount > 0) ? " 1 copy of " : string.Empty;
// Display the confirmation message
var results = new ShoppingCartRemoveViewModel
{
Message = removed + albumName +
" has been removed from your shopping cart.",
CartTotal = cart.GetTotal(),
CartCount = cart.GetCount(),
ItemCount = itemCount,
DeleteId = id
};
return Result.Json(results);
}
// [ChildActionOnly]
public IActionResult CartSummary()
{
var cart = ShoppingCart.GetCart(storeDB, this.Context);
var cartItems = cart.GetCartItems()
.Select(a => a.Album.Title)
.OrderBy(x => x);
// ViewBag.CartCount = cartItems.Count();
// ViewBag.CartSummary = string.Join("\n", cartItems.Distinct());
// return PartialView("CartSummary");
return null;
}
}
}

View File

@ -0,0 +1,58 @@
using MvcMusicStore.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Mvc;
namespace MvcMusicStore.Controllers
{
public class StoreController : Controller
{
MusicStoreEntities storeDB = new MusicStoreEntities();
//
// GET: /Store/
public IActionResult Index()
{
var genres = storeDB.Genres.ToList();
return View(genres);
}
//
// GET: /Store/Browse?genre=Disco
public IActionResult Browse(string genre)
{
// Retrieve Genre genre and its Associated associated Albums albums from database
var genreModel = storeDB.Genres.Include("Albums")
.Single(g => g.Name == genre);
return View(genreModel);
}
public IActionResult Details(int id)
{
var album = storeDB.Albums.Find(id);
return View(album);
}
// [ChildActionOnly]
public IActionResult GenreMenu()
{
var genres = storeDB.Genres
.OrderByDescending(
g => g.Albums.Sum(
a => a.OrderDetails.Sum(
od => od.Quantity)))
.Take(9)
.ToList();
//return PartialView(genres);
return null;
}
}
}

View File

@ -0,0 +1,133 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Mvc;
using MvcMusicStore.Models;
namespace MvcMusicStore.Controllers
{
// [Authorize(Roles = "Administrator")]
public class StoreManagerController : Controller
{
private MusicStoreEntities db = new MusicStoreEntities();
//
// GET: /StoreManager/
public IActionResult Index()
{
var albums = db.Albums.Include(a => a.Genre).Include(a => a.Artist)
.OrderBy(a => a.Price);
return View(albums.ToList());
}
//
// GET: /StoreManager/Details/5
public IActionResult Details(int id = 0)
{
Album album = db.Albums.Find(id);
if (album == null)
{
//return HttpNotFound();
return null;
}
return View(album);
}
//
// GET: /StoreManager/Create
public IActionResult Create()
{
//ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name");
//ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name");
return View();
}
//
// POST: /StoreManager/Create
// [HttpPost]
public IActionResult Create(Album album)
{
if (/*ModelState.IsValid*/true)
{
db.Albums.Add(album);
db.SaveChanges();
// return RedirectToAction("Index");
return null;
}
//ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId);
//ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId);
return View(album);
}
//
// GET: /StoreManager/Edit/5
public IActionResult Edit(int id = 0)
{
Album album = db.Albums.Find(id);
if (album == null)
{
// return HttpNotFound();
return null;
}
//ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId);
//ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId);
return View(album);
}
//
// POST: /StoreManager/Edit/5
// [HttpPost]
public IActionResult Edit(Album album)
{
//if (ModelState.IsValid)
//{
// db.Entry(album).State = EntityState.Modified;
// db.SaveChanges();
// return RedirectToAction("Index");
//}
//ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId);
//ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId);
return View(album);
}
//
// GET: /StoreManager/Delete/5
public IActionResult Delete(int id = 0)
{
Album album = db.Albums.Find(id);
if (album == null)
{
// return HttpNotFound();
return null;
}
return View(album);
}
//
// POST: /StoreManager/Delete/5
// [HttpPost, ActionName("Delete")]
public IActionResult DeleteConfirmed(int id)
{
Album album = db.Albums.Find(id);
db.Albums.Remove(album);
db.SaveChanges();
// return RedirectToAction("Index");
return null;
}
protected /*override*/ void Dispose(bool disposing)
{
db.Dispose();
// base.Dispose(disposing);
}
}
}

View File

@ -0,0 +1,63 @@
// using System.ComponentModel.DataAnnotations;
namespace MvcMusicStore.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; }
}
}

View File

@ -0,0 +1,35 @@
using System.Collections.Generic;
using System.ComponentModel;
// using System.ComponentModel.DataAnnotations;
namespace MvcMusicStore.Models
{
public class Album
{
//[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]
//[Range(0.01, 100.00)]
//[DataType(DataType.Currency)]
public decimal Price { get; set; }
//[DisplayName("Album Art URL")]
//[StringLength(1024)]
public string AlbumArtUrl { get; set; }
public virtual Genre Genre { get; set; }
public virtual Artist Artist { get; set; }
public virtual List<OrderDetail> OrderDetails { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace MvcMusicStore.Models
{
public class Artist
{
public int ArtistId { get; set; }
public string Name { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System;
//using System.ComponentModel.DataAnnotations;
namespace MvcMusicStore.Models
{
public class Cart
{
//[Key]
public int RecordId { get; set; }
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; }
}
}

View File

@ -0,0 +1,12 @@
using System.Collections.Generic;
namespace MvcMusicStore.Models
{
public class Genre
{
public int GenreId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public List<Album> Albums { get; set; }
}
}

View File

@ -0,0 +1,17 @@
//using Microsoft.AspNet.Identity.EntityFramework;
//namespace MvcMusicStore.Models
//{
// // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
// public class ApplicationUser : IdentityUser
// {
// }
// public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
// {
// public ApplicationDbContext()
// : base("DefaultConnection")
// {
// }
// }
//}

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
namespace MvcMusicStore.Models
{
//public class MusicStoreEntities : DbContext
//{
// public DbSet<Album> Albums { get; set; }
// public DbSet<Genre> Genres { get; set; }
// public DbSet<Artist> Artists { get; set; }
// public DbSet<Cart> Carts { get; set; }
// public DbSet<Order> Orders { get; set; }
// public DbSet<OrderDetail> OrderDetails { get; set; }
//}
public class MusicStoreEntities : IDisposable
{
public List<Album> Albums { get; set; }
public List<Genre> Genres { get; set; }
public List<Artist> Artists { get; set; }
public List<Cart> Carts { get; set; }
public List<Order> Orders { get; set; }
public List<OrderDetail> OrderDetails { get; set; }
public void SaveChanges()
{
throw new NotImplementedException();
}
public void Dispose()
{
throw new NotImplementedException();
}
internal object Entry(Album album)
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,67 @@
using System.Collections.Generic;
using System.ComponentModel;
//using System.ComponentModel.DataAnnotations;
namespace MvcMusicStore.Models
{
//[Bind(Include = "FirstName,LastName,Address,City,State,PostalCode,Country,Phone,Email")]
public class Order
{
//[ScaffoldColumn(false)]
public int OrderId { get; set; }
//[ScaffoldColumn(false)]
public System.DateTime OrderDate { get; set; }
//[ScaffoldColumn(false)]
public string Username { get; set; }
//[Required]
//[DisplayName("First Name")]
//[StringLength(160)]
public string FirstName { get; set; }
//[Required]
//[DisplayName("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]
//[DisplayName("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]
//[DisplayName("Email Address")]
//[RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}",
// ErrorMessage = "Email is is not valid.")]
//[DataType(DataType.EmailAddress)]
public string Email { get; set; }
// [ScaffoldColumn(false)]
public decimal Total { get; set; }
public List<OrderDetail> OrderDetails { get; set; }
}
}

View File

@ -0,0 +1,14 @@
namespace MvcMusicStore.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; }
}
}

View File

@ -0,0 +1,825 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace MvcMusicStore.Models
{
public class SampleData //: DropCreateDatabaseIfModelChanges<MusicStoreEntities>
{
protected /*override*/ void Seed(MusicStoreEntities context)
{
const string imgUrl = "~/Images/placeholder.png";
var genres = AddGenres(context);
var artists = AddArtists(context);
AddAlbums(context, imgUrl, genres, artists);
// context.SaveChanges();
}
private static void AddAlbums(MusicStoreEntities context, string imgUrl, List<Genre> genres, List<Artist> artists)
{
context.Albums.Add(new Album { Title = "The Best Of The Men At Work", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Men At Work"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "...And Justice For All", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "עד גבול האור", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "אריק אינשטיין"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black Light Syndrome", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Terry Bozzio, Tony Levin & Steve Stevens"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "10,000 Days", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tool"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "11i", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Supreme Beings of Leisure"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "1960", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Soul-Junk"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "4x4=12 ", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "deadmau5"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Copland Celebration, Vol. I", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "London Symphony Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Lively Mind", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paul Oakenfold"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Matter of Life and Death", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Real Dead One", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Real Live One", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Rush of Blood to the Head", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Coldplay"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Soprano Inspired", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Britten Sinfonia, Ivor Bolton & Lesley Garrett"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Winter Symphony", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Abbey Road", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Beatles"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ace Of Spades", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Motörhead"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Achtung Baby", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Acústico MTV", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Os Paralamas Do Sucesso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Adams, John: The Chairman Dances", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Edo de Waart & San Francisco Symphony"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Adrenaline", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deftones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ænima", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tool"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Afrociberdelia", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chico Science & Nação Zumbi"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "After the Goldrush", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Neil Young"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Airdrawn Dagger", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sasha"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Album Title Goes Here", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "deadmau5"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 1]", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Black Label Society"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 2]", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Black Label Society"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Alive 2007", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Daft Punk"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "All I Ask of You", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Amen (So Be It)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paddy Casey"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Animal Vehicle", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Axis of Awesome"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ao Vivo [IMPORT]", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Zeca Pagodinho"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Apocalyptic Love", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Slash"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Appetite for Destruction", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Guns N' Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Are You Experienced?", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jimi Hendrix"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Arquivo II", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Os Paralamas Do Sucesso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Arquivo Os Paralamas Do Sucesso", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Os Paralamas Do Sucesso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A-Sides", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Soundgarden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Audioslave", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Audioslave"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Automatic for the People", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "R.E.M."), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Axé Bahia 2001", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Various Artists"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Babel", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Mumford & Sons"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bach: Goldberg Variations", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Wilhelm Kempff"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bach: The Brandenburg Concertos", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Orchestra of The Age of Enlightenment"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bach: The Cello Suites", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Yo-Yo Ma"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bach: Toccata & Fugue in D Minor", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ton Koopman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bad Motorfinger", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Soundgarden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Balls to the Wall", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Accept"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Banadeek Ta'ala", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amr Diab"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Barbie Girl", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Aqua"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bark at the Moon (Remastered)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bartok: Violin & Viola Concertos", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Yehudi Menuhin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Barulhinho Bom", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Marisa Monte"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "BBC Sessions [Disc 1] [Live]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "BBC Sessions [Disc 2] [Live]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Be Here Now", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Oasis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bedrock 11 Compiled & Mixed", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "John Digweed"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Berlioz: Symphonie Fantastique", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Michael Tilson Thomas"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Beyond Good And Evil", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Cult"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Big Bad Wolf ", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Armand Van Helden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Big Ones", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Aerosmith"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black Album", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black Sabbath Vol. 4 (Remaster)", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Black Sabbath"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black Sabbath", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Black Sabbath"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blackwater Park", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Opeth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blizzard of Ozz", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blood", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "In This Moment"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blue Moods", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Incognito"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blue", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Weezer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bongo Fury", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Frank Zappa & Captain Beefheart"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Boys & Girls", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alabama Shakes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Brave New World", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "B-Sides 1980-1990", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bunkka", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paul Oakenfold"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "By The Way", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Red Hot Chili Peppers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cake: B-Sides and Rarities", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cake"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Californication", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Red Hot Chili Peppers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Carmina Burana", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Boston Symphony Orchestra & Seiji Ozawa"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Carried to Dust (Bonus Track Version)", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Calexico"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Carry On", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chris Cornell"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cássia Eller - Sem Limite [Disc 1]", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cássia Eller"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chemical Wedding", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Bruce Dickinson"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chill: Brazil (Disc 1)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Marcos Valle"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chill: Brazil (Disc 2)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Antônio Carlos Jobim"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chocolate Starfish And The Hot Dog Flavored Water", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Limp Bizkit"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chronicle, Vol. 1", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Creedence Clearwater Revival"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chronicle, Vol. 2", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Creedence Clearwater Revival"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ciao, Baby", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "TheStart"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cidade Negra - Hits", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cidade Negra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Classic Munkle: Turbo Edition", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Munkle"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Classics: The Best of Sarah Brightman", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Coda", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Come Away With Me", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Norah Jones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Come Taste The Band", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Comfort Eagle", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cake"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Common Reaction", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Uh Huh Her "), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Compositores", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "O Terço"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Contraband", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Velvet Revolver"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Core", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Stone Temple Pilots"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cornerstone", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Styx"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cosmicolor", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "M-Flo"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cross", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Justice"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Culture of Fear", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Thievery Corporation"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Da Lama Ao Caos", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chico Science & Nação Zumbi"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Dakshina", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deva Premal"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Dark Side of the Moon", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pink Floyd"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Death Magnetic", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Deep End of Down", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Above the Fold"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Deep Purple In Rock", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Deixa Entrar", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Falamansa"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Deja Vu", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Crosby, Stills, Nash, and Young"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Di Korpu Ku Alma", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lura"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Diary of a Madman (Remastered)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Diary of a Madman", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Dirt", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alice in Chains"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Diver Down", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Djavan Ao Vivo - Vol. 02", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Djavan"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Djavan Ao Vivo - Vol. 1", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Djavan"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Drum'n'bass for Papa", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Plug"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Duluth", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Trampled By Turtles"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Dummy", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Portishead"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Duos II", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Luciana Souza/Romero Lubambo"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Earl Scruggs and Friends", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Earl Scruggs"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Eden", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "El Camino", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Keys"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Elegant Gypsy", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Al di Meola"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Elements Of Life", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tiësto"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Elis Regina-Minha História", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Elis Regina"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Emergency On Planet Earth", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jamiroquai"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Emotion", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Papa Wemba"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "English Renaissance", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The King's Singers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Every Kind of Light", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Posies"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Faceless", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Godsmack"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Facelift", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alice in Chains"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fair Warning", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fear of a Black Planet", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Public Enemy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fear Of The Dark", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Feels Like Home", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Norah Jones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fireball", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fly", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "For Those About To Rock We Salute You", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "AC/DC"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Four", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Blues Traveler"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Frank", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amy Winehouse"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Further Down the Spiral", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nine Inch Nails"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Garage Inc. (Disc 1)", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Garage Inc. (Disc 2)", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Garbage", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Garbage"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Good News For People Who Love Bad News", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Modest Mouse"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Gordon", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Barenaked Ladies"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Górecki: Symphony No. 3", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Adrian Leaper & Doreen de Feis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits I", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits II", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Duck Sauce"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lenny Kravitz"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lenny Kravitz"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Kiss", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Kiss"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greetings from Michigan", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sufjan Stevens"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Group Therapy", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Above & Beyond"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Handel: The Messiah (Highlights)", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Scholars Baroque Ensemble"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Haydn: Symphonies 99 - 104", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Royal Philharmonic Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Heart of the Night", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Spyro Gyra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Heart On", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Eagles of Death Metal"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Holy Diver", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dio"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Homework", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Daft Punk"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Hot Rocks, 1964-1971 (Disc 1)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Rolling Stones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Houses Of The Holy", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "How To Dismantle An Atomic Bomb", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Human", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Projected"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Hunky Dory", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "David Bowie"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Hymns", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Projected"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Hysteria", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Def Leppard"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Absentia", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Porcupine Tree"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Between", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paul Van Dyk"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Rainbows", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Radiohead"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Step", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Stevie Ray Vaughan & Double Trouble"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In the court of the Crimson King", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "King Crimson"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Through The Out Door", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Your Honor [Disc 1]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Foo Fighters"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Your Honor [Disc 2]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Foo Fighters"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Indestructible", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Rancid"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Infinity", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Journey"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Into The Light", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "David Coverdale"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Introspective", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pet Shop Boys"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Iron Maiden", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "ISAM", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amon Tobin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "IV", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Jagged Little Pill", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alanis Morissette"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Jagged Little Pill", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alanis Morissette"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Jorge Ben Jor 25 Anos", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jorge Ben"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Jota Quest-1995", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jota Quest"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Kick", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "INXS"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Kill 'Em All", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Kind of Blue", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Miles Davis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "King For A Day Fool For A Lifetime", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Faith No More"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Kiss", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Carly Rae Jepsen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Last Call", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cayouche"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Le Freak", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chic"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Le Tigre", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Le Tigre"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Led Zeppelin I", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Led Zeppelin II", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Led Zeppelin III", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Let There Be Rock", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "AC/DC"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Little Earthquakes", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tori Amos"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live [Disc 1]", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Crowes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live [Disc 2]", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Crowes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live After Death", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live At Donington 1992 (Disc 1)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live At Donington 1992 (Disc 2)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live on Earth", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Cat Empire"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live On Two Legs [Live]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pearl Jam"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Living After Midnight", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Judas Priest"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Living", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paddy Casey"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Load", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Love Changes Everything", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "MacArthur Park Suite", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Donna Summer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Machine Head", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Magical Mystery Tour", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Beatles"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mais Do Mesmo", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Legião Urbana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Maquinarama", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Skank"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Marasim", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jagjit Singh"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mascagni: Cavalleria Rusticana", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "James Levine"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Master of Puppets", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mechanics & Mathematics", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Venus Hum"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mental Jewelry", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Live"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Metallics", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "meteora", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Linkin Park"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Meus Momentos", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Gonzaguinha"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mezmerize", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "System Of A Down"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mezzanine", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Massive Attack"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Miles Ahead", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Miles Davis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Milton Nascimento Ao Vivo", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Milton Nascimento"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Minas", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Milton Nascimento"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Minha Historia", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chico Buarque"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Misplaced Childhood", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Marillion"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "MK III The Final Concerts [Disc 1]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Morning Dance", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Spyro Gyra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Motley Crue Greatest Hits", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Mötley Crüe"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Moving Pictures", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Rush"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mozart: Chamber Music", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nash Ensemble"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mozart: Symphonies Nos. 40 & 41", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Berliner Philharmoniker"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Murder Ballads", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nick Cave and the Bad Seeds"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Music For The Jilted Generation", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Prodigy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "My Generation - The Very Best Of The Who", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Who"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "My Name is Skrillex", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Skrillex"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Na Pista", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cláudio Zoli"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Nevermind", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nirvana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "New Adventures In Hi-Fi", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "R.E.M."), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "New Divide", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Linkin Park"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "New York Dolls", Genre = genres.Single(g => g.Name == "Punk"), Price = 8.99M, Artist = artists.Single(a => a.Name == "New York Dolls"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "News Of The World", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Nielsen: The Six Symphonies", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Göteborgs Symfoniker & Neeme Järvi"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Night At The Opera", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Night Castle", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Trans-Siberian Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Nkolo", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lokua Kanza"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "No More Tears (Remastered)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "No Prayer For The Dying", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "No Security", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Rolling Stones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "O Brother, Where Art Thou?", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alison Krauss"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "O Samba Poconé", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Skank"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "O(+>", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Prince"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Oceania", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Smashing Pumpkins"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Off the Deep End", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Weird Al"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "OK Computer", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Radiohead"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Olodum", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Olodum"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "One Love", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "David Guetta"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Operation: Mindcrime", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queensrÿche"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Opiate", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tool"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Outbreak", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dennis Chambers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pachelbel: Canon & Gigue", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "English Concert & Trevor Pinnock"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Paid in Full", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eric B. and Rakim"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Para Siempre", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Vicente Fernandez"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pause", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Four Tet"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Peace Sells... but Who's Buying", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Megadeth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Physical Graffiti [Disc 1]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Physical Graffiti [Disc 2]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Physical Graffiti", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Piece Of Mind", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pinkerton", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Weezer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Plays Metallica By Four Cellos", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Apocalyptica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pop", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Powerslave", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Prenda Minha", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Caetano Veloso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Presence", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pretty Hate Machine", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nine Inch Nails"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Prisoner", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Jezabels"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Privateering", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Mark Knopfler"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Prokofiev: Romeo & Juliet", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Michael Tilson Thomas"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Prokofiev: Symphony No.1", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sergei Prokofiev & Yuri Temirkanov"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "PSY's Best 6th Part 1", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "PSY"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Purcell: The Fairy Queen", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "London Classical Players"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Purpendicular", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Purple", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Stone Temple Pilots"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Quanta Gente Veio Ver (Live)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Gilberto Gil"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Quanta Gente Veio ver--Bônus De Carnaval", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Gilberto Gil"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Quiet Songs", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Aisha Duo"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Raices", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Los Tigres del Norte"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Raising Hell", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Run DMC"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Raoul and the Kings of Spain ", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tears For Fears"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rattle And Hum", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Raul Seixas", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Raul Seixas"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Recovery [Explicit]", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eminem"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Reign In Blood", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Slayer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Relayed", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Yes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "ReLoad", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Respighi:Pines of Rome", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eugene Ormandy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Restless and Wild", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Accept"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Retrospective I (1974-1980)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Rush"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Revelations", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Audioslave"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Revolver", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Beatles"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ride the Lighting ", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ride The Lightning", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ring My Bell", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Anita Ward"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Riot Act", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pearl Jam"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rise of the Phoenix", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Before the Dawn"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rock In Rio [CD1]", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rock In Rio [CD2]", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rock In Rio [CD2]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Roda De Funk", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Funk Como Le Gusta"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Room for Squares", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "John Mayer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Root Down", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jimmy Smith"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rounds", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Four Tet"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rubber Factory", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Keys"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rust in Peace", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Megadeth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Sambas De Enredo 2001", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Various Artists"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Santana - As Years Go By", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Santana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Santana Live", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Santana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Saturday Night Fever", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Bee Gees"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Scary Monsters and Nice Sprites", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Skrillex"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Scheherazade", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chicago Symphony Orchestra & Fritz Reiner"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "SCRIABIN: Vers la flamme", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Christopher O'Riley"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Second Coming", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Stone Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Serie Sem Limite (Disc 1)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tim Maia"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Serie Sem Limite (Disc 2)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tim Maia"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Serious About Men", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Rubberbandits"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Seventh Son of a Seventh Son", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Short Bus", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Filter"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Sibelius: Finlandia", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Berliner Philharmoniker"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Singles Collection", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "David Bowie"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Six Degrees of Inner Turbulence", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dream Theater"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Slave To The Empire", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "T&N"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Slaves And Masters", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Slouching Towards Bethlehem", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Robert James"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Smash", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Offspring"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Something Special", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dolly Parton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Somewhere in Time", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Song(s) You Know By Heart", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jimmy Buffett"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Sound of Music", Genre = genres.Single(g => g.Name == "Punk"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Adicts"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "South American Getaway", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The 12 Cellists of The Berlin Philharmonic"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Sozinho Remix Ao Vivo", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Caetano Veloso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Speak of the Devil", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Spiritual State", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nujabes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "St. Anger", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Still Life", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Opeth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Stop Making Sense", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Talking Heads"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Stormbringer", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Stranger than Fiction", Genre = genres.Single(g => g.Name == "Punk"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Bad Religion"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Strauss: Waltzes", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eugene Ormandy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Supermodified", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amon Tobin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Supernatural", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Santana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Surfing with the Alien (Remastered)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Joe Satriani"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Switched-On Bach", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Wendy Carlos"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Symphony", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Szymanowski: Piano Works, Vol. 1", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Martin Roscoe"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tchaikovsky: The Nutcracker", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "London Symphony Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ted Nugent", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ted Nugent"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Teflon Don", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Rick Ross"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tell Another Joke at the Ol' Choppin' Block", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Danielson Famile"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Temple of the Dog", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Temple of the Dog"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ten", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pearl Jam"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Texas Flood", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Stevie Ray Vaughan"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Battle Rages On", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Beast Live", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paul D'Ianno"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best Of 1980-1990", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best of 19902000", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best of Beethoven", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nicolaus Esterhazy Sinfonia"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best Of Billy Cobham", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Billy Cobham"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best of Ed Motta", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ed Motta"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best Of Van Halen, Vol. I", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Bridge", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Melanie Fiona"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Cage", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tygers of Pan Tang"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Chicago Transit Authority", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chicago "), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Chronic", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dr. Dre"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Colour And The Shape", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Foo Fighters"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Crane Wife", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Decemberists"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Cream Of Clapton", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eric Clapton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Cure", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Cure"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Dark Side Of The Moon", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pink Floyd"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Divine Conspiracy", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Epica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Doors", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Doors"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Dream of the Blue Turtles", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sting"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Essential Miles Davis [Disc 1]", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Miles Davis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Essential Miles Davis [Disc 2]", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Miles Davis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Final Concerts (Disc 2)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Final Frontier", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Head and the Heart", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Head and the Heart"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Joshua Tree", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Last Night of the Proms", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "BBC Concert Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Lumineers", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Lumineers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Number of The Beast", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Number of The Beast", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Police Greatest Hits", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Police"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Song Remains The Same (Disc 1)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Song Remains The Same (Disc 2)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Southern Harmony and Musical Companion", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Crowes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Spade", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Butch Walker & The Black Widows"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Stone Roses", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Stone Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Suburbs", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Arcade Fire"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Three Tenors Disc1/Disc2", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Carreras, Pavarotti, Domingo"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Trees They Grow So High", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Wall", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pink Floyd"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The X Factor", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Them Crooked Vultures", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Them Crooked Vultures"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "This Is Happening", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "LCD Soundsystem"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Thunder, Lightning, Strike", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Go! Team"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Time to Say Goodbye", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Time, Love & Tenderness", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Michael Bolton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tomorrow Starts Today", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Mobile"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tribute", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tuesday Night Music Club", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sheryl Crow"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Umoja", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "BLØF"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Under the Pink", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tori Amos"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Undertow", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tool"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Un-Led-Ed", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dread Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Unplugged [Live]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Kiss"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Unplugged", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eric Clapton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Unplugged", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eric Clapton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Untrue", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Burial"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Use Your Illusion I", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Guns N' Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Use Your Illusion II", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Guns N' Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Use Your Illusion II", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Guns N' Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Van Halen III", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Van Halen", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Version 2.0", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Garbage"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Vinicius De Moraes", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Vinícius De Moraes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Virtual XI", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Voodoo Lounge", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Rolling Stones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Vozes do MPB", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Various Artists"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Vs.", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pearl Jam"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Wagner: Favourite Overtures", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sir Georg Solti & Wiener Philharmoniker"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Walking Into Clarksdale", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Page & Plant"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Wapi Yo", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lokua Kanza"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "War", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Warner 25 Anos", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Antônio Carlos Jobim"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Wasteland R&Btheque", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Raunchy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Watermark", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Enya"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "We Were Exploding Anyway", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "65daysofstatic"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Weill: The Seven Deadly Sins", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Orchestre de l'Opéra de Lyon"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "White Pony", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deftones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Who's Next", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Who"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Wish You Were Here", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pink Floyd"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "With Oden on Our Side", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amon Amarth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Worlds", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Aaron Goldberg"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Worship Music", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Anthrax"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "X&Y", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Coldplay"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Xinti", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sara Tavares"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Yano", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Yano"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Yesterday Once More Disc 1/Disc 2", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Carpenters"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Zooropa", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Zoso", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
}
private static List<Artist> AddArtists(MusicStoreEntities context)
{
var artists = new List<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 = "אריק אינשטיין"}
};
artists.ForEach(s => context.Artists.Add(s));
context.SaveChanges();
return artists;
}
private static List<Genre> AddGenres(MusicStoreEntities context)
{
var genres = new List<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.ForEach(s => context.Genres.Add(s));
context.SaveChanges();
return genres;
}
}
}

View File

@ -0,0 +1,196 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.Mvc;
namespace MvcMusicStore.Models
{
public partial class ShoppingCart
{
MusicStoreEntities _db;
string ShoppingCartId { get; set; }
public ShoppingCart(MusicStoreEntities db)
{
_db = db;
}
public const string CartSessionKey = "CartId";
public static ShoppingCart GetCart(MusicStoreEntities db, HttpContext context)
{
var cart = new ShoppingCart(db);
cart.ShoppingCartId = cart.GetCartId(context);
return cart;
}
// Helper method to simplify shopping cart calls
public static ShoppingCart GetCart(MusicStoreEntities db, Controller controller)
{
return GetCart(db, controller.Context);
}
public void AddToCart(Album album)
{
// Get the matching cart and album instances
var cartItem = _db.Carts.SingleOrDefault(
c => c.CartId == ShoppingCartId
&& c.AlbumId == album.AlbumId);
if (cartItem == null)
{
// Create a new cart item if no cart item exists
cartItem = new Cart
{
AlbumId = album.AlbumId,
CartId = ShoppingCartId,
Count = 1,
DateCreated = DateTime.Now
};
_db.Carts.Add(cartItem);
}
else
{
// If the item does exist in the cart, then add one to the quantity
cartItem.Count++;
}
}
public int RemoveFromCart(int id)
{
// Get the cart
var cartItem = _db.Carts.Single(
cart => cart.CartId == ShoppingCartId
&& cart.RecordId == id);
int itemCount = 0;
if (cartItem != null)
{
if (cartItem.Count > 1)
{
cartItem.Count--;
itemCount = cartItem.Count;
}
else
{
_db.Carts.Remove(cartItem);
}
}
return itemCount;
}
public void EmptyCart()
{
var cartItems = _db.Carts.Where(cart => cart.CartId == ShoppingCartId);
foreach (var cartItem in cartItems)
{
_db.Carts.Remove(cartItem);
}
}
public List<Cart> GetCartItems()
{
return _db.Carts.Where(cart => cart.CartId == ShoppingCartId).ToList();
}
public int GetCount()
{
// Get the count of each item in the cart and sum them up
int? count = (from cartItems in _db.Carts
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
decimal? total = (from cartItems in _db.Carts
where cartItems.CartId == ShoppingCartId
select (int?)cartItems.Count * cartItems.Album.Price).Sum();
return total ?? decimal.Zero;
}
public int CreateOrder(Order order)
{
decimal orderTotal = 0;
var cartItems = GetCartItems();
// 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 orderDetail = new OrderDetail
{
AlbumId = item.AlbumId,
OrderId = order.OrderId,
UnitPrice = album.Price,
Quantity = item.Count,
};
// Set the order total of the shopping cart
orderTotal += (item.Count * item.Album.Price);
_db.OrderDetails.Add(orderDetail);
}
// 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)
{
//if (context.Session[CartSessionKey] == null)
//{
// if (!string.IsNullOrWhiteSpace(context.User.Identity.Name))
// {
// context.Session[CartSessionKey] = context.User.Identity.Name;
// }
// else
// {
// // Generate a new random GUID using System.Guid class
// Guid tempCartId = Guid.NewGuid();
// // Send tempCartId back to client as a cookie
// context.Session[CartSessionKey] = tempCartId.ToString();
// }
//}
//return context.Session[CartSessionKey].ToString();
return Guid.NewGuid().ToString();
}
// When a user has logged in, migrate their shopping cart to
// be associated with their username
public void MigrateCart(string userName)
{
var shoppingCart = _db.Carts.Where(c => c.CartId == ShoppingCartId);
foreach (Cart item in shoppingCart)
{
item.CartId = userName;
}
}
}
}

38
src/MusicStore/Stubs.cs Normal file
View File

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MvcMusicStore
{
public static class ListExtensions
{
public static void ForEach<T>(this List<T> list, Action<T> each)
{
foreach (var item in list)
{
each(item);
}
}
}
public static class ListPretendingToBeDbContextExtensions
{
// Mock DbSet (List<T>)
public static T Find<T>(this List<T> list, params object[] keys)
{
return default(T);
}
public static IEnumerable<T> Include<T>(this IEnumerable<T> list, string include)
{
return list;
}
public static IEnumerable<T> Include<T, A>(this IEnumerable<T> list, Func<T, A> projection)
{
return list;
}
}
}

View File

@ -0,0 +1,11 @@
namespace MvcMusicStore.ViewModels
{
public class ShoppingCartRemoveViewModel
{
public string Message { get; set; }
public decimal CartTotal { get; set; }
public int CartCount { get; set; }
public int ItemCount { get; set; }
public int DeleteId { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using System.Collections.Generic;
using MvcMusicStore.Models;
namespace MvcMusicStore.ViewModels
{
public class ShoppingCartViewModel
{
public List<Cart> CartItems { get; set; }
public decimal CartTotal { get; set; }
}
}

View File

@ -0,0 +1,7 @@
{
"dependencies": {
"Microsoft.AspNet.Abstractions": "0.1-alpha-*",
"Microsoft.AspNet.DependencyInjection" : "0.1-alpha-*",
"Microsoft.AspNet.Mvc" : "0.1-alpha-*"
}
}

View File

@ -0,0 +1,31 @@
using System.Web;
using System.Web.Optimization;
namespace MvcMusicStore
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
}
}

View File

@ -0,0 +1,13 @@
using System.Web;
using System.Web.Mvc;
namespace MvcMusicStore
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace MvcMusicStore
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}

View File

@ -0,0 +1,47 @@
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using MvcMusicStore.Models;
using Owin;
using System.Configuration;
using System.Threading.Tasks;
namespace MvcMusicStore
{
public partial class Startup
{
public void ConfigureApp(IAppBuilder app)
{
System.Data.Entity.Database.SetInitializer(new MvcMusicStore.Models.SampleData());
CreateAdminUser();
}
private async void CreateAdminUser()
{
string _username = ConfigurationManager.AppSettings["DefaultAdminUsername"];
string _password = ConfigurationManager.AppSettings["DefaultAdminPassword"];
string _role = "Administrator";
var context = new ApplicationDbContext();
var userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(context));
var roleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(context));
var role = new IdentityRole(_role);
var result = await roleManager.RoleExistsAsync(_role);
if (result == false)
{
await roleManager.CreateAsync(role);
}
var user = await userManager.FindByNameAsync(_username);
if (user == null)
{
user = new ApplicationUser { UserName = _username };
await userManager.CreateAsync(user, _password);
await userManager.AddToRoleAsync(user.Id, _role);
}
}
}
}

View File

@ -0,0 +1,38 @@
using Microsoft.AspNet.Identity;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Owin;
namespace MvcMusicStore
{
public partial class Startup
{
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
public void ConfigureAuth(IAppBuilder app)
{
// Enable the application to use a cookie to store information for the signed in user
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
// Use a cookie to temporarily store information about a user logging in with a third party login provider
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
// Uncomment the following lines to enable logging in with third party login providers
//app.UseMicrosoftAccountAuthentication(
// clientId: "",
// clientSecret: "");
//app.UseTwitterAuthentication(
// consumerKey: "",
// consumerSecret: "");
//app.UseFacebookAuthentication(
// appId: "",
// appSecret: "");
//app.UseGoogleAuthentication();
}
}
}

View File

@ -0,0 +1,70 @@
body {
padding-top: 50px;
padding-bottom: 20px;
}
/* Set padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}
/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
max-width: 280px;
}
/* styles for validation helpers */
.field-validation-error {
color: #b94a48;
}
.field-validation-valid {
display: none;
}
input.input-validation-error {
border: 1px solid #b94a48;
}
input[type="checkbox"].input-validation-error {
border: 0 none;
}
.validation-summary-errors {
color: #b94a48;
}
.validation-summary-valid {
display: none;
}
/* Music Store additions */
ul#album-list li {
height: 160px;
}
ul#album-list li img:hover {
box-shadow: 1px 1px 7px #777;
}
ul#album-list li img {
box-shadow: 1px 1px 5px #999;
border: none;
padding: 0;
}
ul#album-list li a, ul#album-details li a {
text-decoration:none;
}
ul#album-list li a:hover {
background: none;
-webkit-text-shadow: 1px 1px 2px #bbb;
text-shadow: 1px 1px 2px #bbb;
color: #363430;
}

View File

@ -0,0 +1,384 @@
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
}
.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn:active,
.btn.active {
background-image: none;
}
.btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, 0%, #e6e6e6, 100%);
background-image: -moz-linear-gradient(top, #ffffff 0%, #e6e6e6 100%);
background-image: linear-gradient(to bottom, #ffffff 0%, #e6e6e6 100%);
background-repeat: repeat-x;
border-color: #e0e0e0;
border-color: #ccc;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
}
.btn-default:active,
.btn-default.active {
background-color: #e6e6e6;
border-color: #e0e0e0;
}
.btn-primary {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9));
background-image: -webkit-linear-gradient(top, #428bca, 0%, #3071a9, 100%);
background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%);
background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
background-repeat: repeat-x;
border-color: #2d6ca2;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
}
.btn-primary:active,
.btn-primary.active {
background-color: #3071a9;
border-color: #2d6ca2;
}
.btn-success {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#449d44));
background-image: -webkit-linear-gradient(top, #5cb85c, 0%, #449d44, 100%);
background-image: -moz-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
background-repeat: repeat-x;
border-color: #419641;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
}
.btn-success:active,
.btn-success.active {
background-color: #449d44;
border-color: #419641;
}
.btn-warning {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#ec971f));
background-image: -webkit-linear-gradient(top, #f0ad4e, 0%, #ec971f, 100%);
background-image: -moz-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
background-repeat: repeat-x;
border-color: #eb9316;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
}
.btn-warning:active,
.btn-warning.active {
background-color: #ec971f;
border-color: #eb9316;
}
.btn-danger {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c9302c));
background-image: -webkit-linear-gradient(top, #d9534f, 0%, #c9302c, 100%);
background-image: -moz-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
background-repeat: repeat-x;
border-color: #c12e2a;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
}
.btn-danger:active,
.btn-danger.active {
background-color: #c9302c;
border-color: #c12e2a;
}
.btn-info {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#31b0d5));
background-image: -webkit-linear-gradient(top, #5bc0de, 0%, #31b0d5, 100%);
background-image: -moz-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
background-repeat: repeat-x;
border-color: #2aabd2;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
}
.btn-info:active,
.btn-info.active {
background-color: #31b0d5;
border-color: #2aabd2;
}
.thumbnail,
.img-thumbnail {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #357ebd;
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%);
background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
}
.navbar {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#f8f8f8));
background-image: -webkit-linear-gradient(top, #ffffff, 0%, #f8f8f8, 100%);
background-image: -moz-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
background-repeat: repeat-x;
border-radius: 4px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
}
.navbar .navbar-nav > .active > a {
background-color: #f8f8f8;
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.navbar-inverse {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#3c3c3c), to(#222222));
background-image: -webkit-linear-gradient(top, #3c3c3c, 0%, #222222, 100%);
background-image: -moz-linear-gradient(top, #3c3c3c 0%, #222222 100%);
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
}
.navbar-inverse .navbar-nav > .active > a {
background-color: #222222;
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
.alert {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.alert-success {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#c8e5bc));
background-image: -webkit-linear-gradient(top, #dff0d8, 0%, #c8e5bc, 100%);
background-image: -moz-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
background-repeat: repeat-x;
border-color: #b2dba1;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
}
.alert-info {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#b9def0));
background-image: -webkit-linear-gradient(top, #d9edf7, 0%, #b9def0, 100%);
background-image: -moz-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
background-repeat: repeat-x;
border-color: #9acfea;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
}
.alert-warning {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#f8efc0));
background-image: -webkit-linear-gradient(top, #fcf8e3, 0%, #f8efc0, 100%);
background-image: -moz-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
background-repeat: repeat-x;
border-color: #f5e79e;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
}
.alert-danger {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#e7c3c3));
background-image: -webkit-linear-gradient(top, #f2dede, 0%, #e7c3c3, 100%);
background-image: -moz-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
background-repeat: repeat-x;
border-color: #dca7a7;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
}
.progress {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f5f5f5));
background-image: -webkit-linear-gradient(top, #ebebeb, 0%, #f5f5f5, 100%);
background-image: -moz-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
}
.progress-bar {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9));
background-image: -webkit-linear-gradient(top, #428bca, 0%, #3071a9, 100%);
background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%);
background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
}
.progress-bar-success {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#449d44));
background-image: -webkit-linear-gradient(top, #5cb85c, 0%, #449d44, 100%);
background-image: -moz-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
}
.progress-bar-info {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#31b0d5));
background-image: -webkit-linear-gradient(top, #5bc0de, 0%, #31b0d5, 100%);
background-image: -moz-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
}
.progress-bar-warning {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#ec971f));
background-image: -webkit-linear-gradient(top, #f0ad4e, 0%, #ec971f, 100%);
background-image: -moz-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
}
.progress-bar-danger {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c9302c));
background-image: -webkit-linear-gradient(top, #d9534f, 0%, #c9302c, 100%);
background-image: -moz-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
}
.list-group {
border-radius: 4px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
text-shadow: 0 -1px 0 #3071a9;
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3278b3));
background-image: -webkit-linear-gradient(top, #428bca, 0%, #3278b3, 100%);
background-image: -moz-linear-gradient(top, #428bca 0%, #3278b3 100%);
background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
background-repeat: repeat-x;
border-color: #3278b3;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
}
.panel {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.panel-default > .panel-heading {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
background-image: -webkit-linear-gradient(top, #f5f5f5, 0%, #e8e8e8, 100%);
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
}
.panel-primary > .panel-heading {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%);
background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
}
.panel-success > .panel-heading {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#d0e9c6));
background-image: -webkit-linear-gradient(top, #dff0d8, 0%, #d0e9c6, 100%);
background-image: -moz-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
}
.panel-info > .panel-heading {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#c4e3f3));
background-image: -webkit-linear-gradient(top, #d9edf7, 0%, #c4e3f3, 100%);
background-image: -moz-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
}
.panel-warning > .panel-heading {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#faf2cc));
background-image: -webkit-linear-gradient(top, #fcf8e3, 0%, #faf2cc, 100%);
background-image: -moz-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
}
.panel-danger > .panel-heading {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#ebcccc));
background-image: -webkit-linear-gradient(top, #f2dede, 0%, #ebcccc, 100%);
background-image: -moz-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
}
.well {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#e8e8e8), to(#f5f5f5));
background-image: -webkit-linear-gradient(top, #e8e8e8, 0%, #f5f5f5, 100%);
background-image: -moz-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
background-repeat: repeat-x;
border-color: #dcdcdc;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
}

File diff suppressed because one or more lines are too long

6805
src/MvcMusicStore/Content/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,423 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Owin.Security;
using MvcMusicStore.Models;
namespace MvcMusicStore.Controllers
{
[Authorize]
public class AccountController : Controller
{
public AccountController()
: this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext())))
{
}
public AccountController(UserManager<ApplicationUser> userManager)
{
UserManager = userManager;
}
public UserManager<ApplicationUser> UserManager { get; private set; }
private void MigrateShoppingCart(string UserName)
{
var storeDb = new MusicStoreEntities();
// Associate shopping cart items with logged-in user
var cart = ShoppingCart.GetCart(storeDb, this.HttpContext);
cart.MigrateCart(UserName);
storeDb.SaveChanges();
Session[ShoppingCart.CartSessionKey] = UserName;
}
//
// GET: /Account/Login
[AllowAnonymous]
public ActionResult Login(string returnUrl)
{
ViewBag.ReturnUrl = returnUrl;
return View();
}
//
// POST: /Account/Login
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Login(LoginViewModel model, string returnUrl)
{
if (ModelState.IsValid)
{
var user = await UserManager.FindAsync(model.UserName, model.Password);
if (user != null)
{
await SignInAsync(user, model.RememberMe);
return RedirectToLocal(returnUrl);
}
else
{
ModelState.AddModelError("", "Invalid username or password.");
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
//
// GET: /Account/Register
[AllowAnonymous]
public ActionResult Register()
{
return View();
}
//
// POST: /Account/Register
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Register(RegisterViewModel model)
{
if (ModelState.IsValid)
{
var user = new ApplicationUser() { UserName = model.UserName };
var result = await UserManager.CreateAsync(user, model.Password);
if (result.Succeeded)
{
await SignInAsync(user, isPersistent: false);
return RedirectToAction("Index", "Home");
}
else
{
AddErrors(result);
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
//
// POST: /Account/Disassociate
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Disassociate(string loginProvider, string providerKey)
{
ManageMessageId? message = null;
IdentityResult result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
if (result.Succeeded)
{
message = ManageMessageId.RemoveLoginSuccess;
}
else
{
message = ManageMessageId.Error;
}
return RedirectToAction("Manage", new { Message = message });
}
//
// GET: /Account/Manage
public ActionResult Manage(ManageMessageId? message)
{
ViewBag.StatusMessage =
message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed."
: message == ManageMessageId.SetPasswordSuccess ? "Your password has been set."
: message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed."
: message == ManageMessageId.Error ? "An error has occurred."
: "";
ViewBag.HasLocalPassword = HasPassword();
ViewBag.ReturnUrl = Url.Action("Manage");
return View();
}
//
// POST: /Account/Manage
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Manage(ManageUserViewModel model)
{
bool hasPassword = HasPassword();
ViewBag.HasLocalPassword = hasPassword;
ViewBag.ReturnUrl = Url.Action("Manage");
if (hasPassword)
{
if (ModelState.IsValid)
{
IdentityResult result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.OldPassword, model.NewPassword);
if (result.Succeeded)
{
return RedirectToAction("Manage", new { Message = ManageMessageId.ChangePasswordSuccess });
}
else
{
AddErrors(result);
}
}
}
else
{
// User does not have a password so remove any validation errors caused by a missing OldPassword field
ModelState state = ModelState["OldPassword"];
if (state != null)
{
state.Errors.Clear();
}
if (ModelState.IsValid)
{
IdentityResult result = await UserManager.AddPasswordAsync(User.Identity.GetUserId(), model.NewPassword);
if (result.Succeeded)
{
return RedirectToAction("Manage", new { Message = ManageMessageId.SetPasswordSuccess });
}
else
{
AddErrors(result);
}
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
//
// POST: /Account/ExternalLogin
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public ActionResult ExternalLogin(string provider, string returnUrl)
{
// Request a redirect to the external login provider
return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl }));
}
//
// GET: /Account/ExternalLoginCallback
[AllowAnonymous]
public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
{
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
if (loginInfo == null)
{
return RedirectToAction("Login");
}
// Sign in the user with this external login provider if the user already has a login
var user = await UserManager.FindAsync(loginInfo.Login);
if (user != null)
{
await SignInAsync(user, isPersistent: false);
return RedirectToLocal(returnUrl);
}
else
{
// If the user does not have an account, then prompt the user to create an account
ViewBag.ReturnUrl = returnUrl;
ViewBag.LoginProvider = loginInfo.Login.LoginProvider;
return View("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { UserName = loginInfo.DefaultUserName });
}
}
//
// POST: /Account/LinkLogin
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult LinkLogin(string provider)
{
// Request a redirect to the external login provider to link a login for the current user
return new ChallengeResult(provider, Url.Action("LinkLoginCallback", "Account"), User.Identity.GetUserId());
}
//
// GET: /Account/LinkLoginCallback
public async Task<ActionResult> LinkLoginCallback()
{
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(XsrfKey, User.Identity.GetUserId());
if (loginInfo == null)
{
return RedirectToAction("Manage", new { Message = ManageMessageId.Error });
}
var result = await UserManager.AddLoginAsync(User.Identity.GetUserId(), loginInfo.Login);
if (result.Succeeded)
{
return RedirectToAction("Manage");
}
return RedirectToAction("Manage", new { Message = ManageMessageId.Error });
}
//
// POST: /Account/ExternalLoginConfirmation
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl)
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Manage");
}
if (ModelState.IsValid)
{
// Get the information about the user from the external login provider
var info = await AuthenticationManager.GetExternalLoginInfoAsync();
if (info == null)
{
return View("ExternalLoginFailure");
}
var user = new ApplicationUser() { UserName = model.UserName };
var result = await UserManager.CreateAsync(user);
if (result.Succeeded)
{
result = await UserManager.AddLoginAsync(user.Id, info.Login);
if (result.Succeeded)
{
await SignInAsync(user, isPersistent: false);
return RedirectToLocal(returnUrl);
}
}
AddErrors(result);
}
ViewBag.ReturnUrl = returnUrl;
return View(model);
}
//
// POST: /Account/LogOff
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult LogOff()
{
AuthenticationManager.SignOut();
return RedirectToAction("Index", "Home");
}
//
// GET: /Account/ExternalLoginFailure
[AllowAnonymous]
public ActionResult ExternalLoginFailure()
{
return View();
}
[ChildActionOnly]
public ActionResult RemoveAccountList()
{
var linkedAccounts = UserManager.GetLogins(User.Identity.GetUserId());
ViewBag.ShowRemoveButton = HasPassword() || linkedAccounts.Count > 1;
return (ActionResult)PartialView("_RemoveAccountPartial", linkedAccounts);
}
protected override void Dispose(bool disposing)
{
if (disposing && UserManager != null)
{
UserManager.Dispose();
UserManager = null;
}
base.Dispose(disposing);
}
#region Helpers
// Used for XSRF protection when adding external logins
private const string XsrfKey = "XsrfId";
private IAuthenticationManager AuthenticationManager
{
get
{
return HttpContext.GetOwinContext().Authentication;
}
}
private async Task SignInAsync(ApplicationUser user, bool isPersistent)
{
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
var identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity);
// Migrate the user's shopping cart
MigrateShoppingCart(user.UserName);
}
private void AddErrors(IdentityResult result)
{
foreach (var error in result.Errors)
{
ModelState.AddModelError("", error);
}
}
private bool HasPassword()
{
var user = UserManager.FindById(User.Identity.GetUserId());
if (user != null)
{
return user.PasswordHash != null;
}
return false;
}
public enum ManageMessageId
{
ChangePasswordSuccess,
SetPasswordSuccess,
RemoveLoginSuccess,
Error
}
private ActionResult RedirectToLocal(string returnUrl)
{
if (Url.IsLocalUrl(returnUrl))
{
return Redirect(returnUrl);
}
else
{
return RedirectToAction("Index", "Home");
}
}
private class ChallengeResult : HttpUnauthorizedResult
{
public ChallengeResult(string provider, string redirectUri) : this(provider, redirectUri, null)
{
}
public ChallengeResult(string provider, string redirectUri, string userId)
{
LoginProvider = provider;
RedirectUri = redirectUri;
UserId = userId;
}
public string LoginProvider { get; set; }
public string RedirectUri { get; set; }
public string UserId { get; set; }
public override void ExecuteResult(ControllerContext context)
{
var properties = new AuthenticationProperties() { RedirectUri = RedirectUri };
if (UserId != null)
{
properties.Dictionary[XsrfKey] = UserId;
}
context.HttpContext.GetOwinContext().Authentication.Challenge(properties, LoginProvider);
}
}
#endregion
}
}

View File

@ -0,0 +1,85 @@
using System;
using System.Linq;
using System.Web.Mvc;
using MvcMusicStore.Models;
namespace MvcMusicStore.Controllers
{
[Authorize]
public class CheckoutController : Controller
{
MusicStoreEntities storeDB = new MusicStoreEntities();
const string PromoCode = "FREE";
//
// GET: /Checkout/
public ActionResult AddressAndPayment()
{
return View();
}
//
// POST: /Checkout/AddressAndPayment
[HttpPost]
public ActionResult AddressAndPayment(FormCollection values)
{
var order = new Order();
TryUpdateModel(order);
try
{
if (string.Equals(values["PromoCode"], PromoCode,
StringComparison.OrdinalIgnoreCase) == false)
{
return View(order);
}
else
{
order.Username = User.Identity.Name;
order.OrderDate = DateTime.Now;
//Add the Order
storeDB.Orders.Add(order);
//Process the order
var cart = ShoppingCart.GetCart(storeDB, this.HttpContext);
cart.CreateOrder(order);
// Save all changes
storeDB.SaveChanges();
return RedirectToAction("Complete",
new { id = order.OrderId });
}
}
catch
{
//Invalid - redisplay with errors
return View(order);
}
}
//
// GET: /Checkout/Complete
public ActionResult Complete(int id)
{
// Validate customer owns this order
bool isValid = storeDB.Orders.Any(
o => o.OrderId == id &&
o.Username == User.Identity.Name);
if (isValid)
{
return View(id);
}
else
{
return View("Error");
}
}
}
}

View File

@ -0,0 +1,35 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcMusicStore.Models;
namespace MvcMusicStore.Controllers
{
public class HomeController : Controller
{
private MusicStoreEntities storeDB = new MusicStoreEntities();
//
// GET: /Home/
public ActionResult Index()
{
// Get most popular albums
var albums = GetTopSellingAlbums(6);
return View(albums);
}
private List<Album> GetTopSellingAlbums(int count)
{
// Group the order details by album and return
// the albums with the highest count
return storeDB.Albums
.OrderByDescending(a => a.OrderDetails.Count())
.Take(count)
.ToList();
}
}
}

View File

@ -0,0 +1,101 @@
using System.Linq;
using System.Web.Mvc;
using MvcMusicStore.Models;
using MvcMusicStore.ViewModels;
namespace MvcMusicStore.Controllers
{
public class ShoppingCartController : Controller
{
MusicStoreEntities storeDB = new MusicStoreEntities();
//
// GET: /ShoppingCart/
public ActionResult Index()
{
var cart = ShoppingCart.GetCart(storeDB, this.HttpContext);
// Set up our ViewModel
var viewModel = new ShoppingCartViewModel
{
CartItems = cart.GetCartItems(),
CartTotal = cart.GetTotal()
};
// Return the view
return View(viewModel);
}
//
// GET: /ShoppingCart/AddToCart/5
public ActionResult AddToCart(int id)
{
// Retrieve the album from the database
var addedAlbum = storeDB.Albums
.Single(album => album.AlbumId == id);
// Add it to the shopping cart
var cart = ShoppingCart.GetCart(storeDB, this.HttpContext);
cart.AddToCart(addedAlbum);
storeDB.SaveChanges();
// Go back to the main store page for more shopping
return RedirectToAction("Index");
}
//
// AJAX: /ShoppingCart/RemoveFromCart/5
[HttpPost]
public ActionResult RemoveFromCart(int id)
{
// Retrieve the current user's shopping cart
var cart = ShoppingCart.GetCart(storeDB, this.HttpContext);
// Get the name of the album to display confirmation
string albumName = storeDB.Carts
.Single(item => item.RecordId == id).Album.Title;
// Remove from cart
int itemCount = cart.RemoveFromCart(id);
storeDB.SaveChanges();
string removed = (itemCount > 0) ? " 1 copy of " : string.Empty;
// Display the confirmation message
var results = new ShoppingCartRemoveViewModel
{
Message = removed + albumName +
" has been removed from your shopping cart.",
CartTotal = cart.GetTotal(),
CartCount = cart.GetCount(),
ItemCount = itemCount,
DeleteId = id
};
return Json(results);
}
[ChildActionOnly]
public ActionResult CartSummary()
{
var cart = ShoppingCart.GetCart(storeDB, this.HttpContext);
var cartItems = cart.GetCartItems()
.Select(a => a.Album.Title)
.OrderBy(x => x);
ViewBag.CartCount = cartItems.Count();
ViewBag.CartSummary = string.Join("\n", cartItems.Distinct());
return PartialView("CartSummary");
}
}
}

View File

@ -0,0 +1,57 @@
using MvcMusicStore.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MvcMusicStore.Controllers
{
public class StoreController : Controller
{
MusicStoreEntities storeDB = new MusicStoreEntities();
//
// GET: /Store/
public ActionResult Index()
{
var genres = storeDB.Genres.ToList();
return View(genres);
}
//
// GET: /Store/Browse?genre=Disco
public ActionResult Browse(string genre)
{
// Retrieve Genre genre and its Associated associated Albums albums from database
var genreModel = storeDB.Genres.Include("Albums")
.Single(g => g.Name == genre);
return View(genreModel);
}
public ActionResult Details(int id)
{
var album = storeDB.Albums.Find(id);
return View(album);
}
[ChildActionOnly]
public ActionResult GenreMenu()
{
var genres = storeDB.Genres
.OrderByDescending(
g => g.Albums.Sum(
a => a.OrderDetails.Sum(
od => od.Quantity)))
.Take(9)
.ToList();
return PartialView(genres);
}
}
}

View File

@ -0,0 +1,131 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcMusicStore.Models;
namespace MvcMusicStore.Controllers
{
[Authorize(Roles = "Administrator")]
public class StoreManagerController : Controller
{
private MusicStoreEntities db = new MusicStoreEntities();
//
// GET: /StoreManager/
public ActionResult Index()
{
var albums = db.Albums.Include(a => a.Genre).Include(a => a.Artist)
.OrderBy(a => a.Price);
return View(albums.ToList());
}
//
// GET: /StoreManager/Details/5
public ActionResult Details(int id = 0)
{
Album album = db.Albums.Find(id);
if (album == null)
{
return HttpNotFound();
}
return View(album);
}
//
// GET: /StoreManager/Create
public ActionResult Create()
{
ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name");
ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name");
return View();
}
//
// POST: /StoreManager/Create
[HttpPost]
public ActionResult Create(Album album)
{
if (ModelState.IsValid)
{
db.Albums.Add(album);
db.SaveChanges();
return RedirectToAction("Index");
}
ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId);
ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId);
return View(album);
}
//
// GET: /StoreManager/Edit/5
public ActionResult Edit(int id = 0)
{
Album album = db.Albums.Find(id);
if (album == null)
{
return HttpNotFound();
}
ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId);
ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId);
return View(album);
}
//
// POST: /StoreManager/Edit/5
[HttpPost]
public ActionResult Edit(Album album)
{
if (ModelState.IsValid)
{
db.Entry(album).State = EntityState.Modified;
db.SaveChanges();
return RedirectToAction("Index");
}
ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId);
ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId);
return View(album);
}
//
// GET: /StoreManager/Delete/5
public ActionResult Delete(int id = 0)
{
Album album = db.Albums.Find(id);
if (album == null)
{
return HttpNotFound();
}
return View(album);
}
//
// POST: /StoreManager/Delete/5
[HttpPost, ActionName("Delete")]
public ActionResult DeleteConfirmed(int id)
{
Album album = db.Albums.Find(id);
db.Albums.Remove(album);
db.SaveChanges();
return RedirectToAction("Index");
}
protected override void Dispose(bool disposing)
{
db.Dispose();
base.Dispose(disposing);
}
}
}

View File

@ -0,0 +1 @@
<%@ Application Codebehind="Global.asax.cs" Inherits="MvcMusicStore.MvcApplication" Language="C#" %>

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace MvcMusicStore
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
System.Data.Entity.Database.SetInitializer(new MvcMusicStore.Models.SampleData());
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,303 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="77.981812"
height="38"
id="svg2"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="logo.svg"
inkscape:export-filename="C:\Users\Jon\SkyDrive\Projects\Git\MvcMusicStore\MvcMusicStore\Content\Images\logo.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.313708"
inkscape:cx="68.62794"
inkscape:cy="21.563703"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1137"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid4175"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-381.25,-434.47363)">
<g
id="g3138"
transform="matrix(0.99433276,0,0,0.99433276,2.6879598,-28.875086)">
<g
transform="matrix(0.95191143,0,0,0.94999997,-13.610187,70.866904)"
id="g4123">
<g
id="g4004"
transform="translate(6.4397225,-81.443549)">
<path
transform="matrix(1.037037,0,0,1.0566038,33.991419,-29.473365)"
d="m 439.46429,517.54077 c 0,7.84047 -6.47589,14.19643 -14.46429,14.19643 -7.9884,0 -14.46429,-6.35596 -14.46429,-14.19643 0,-7.84047 6.47589,-14.19643 14.46429,-14.19643 7.9884,0 14.46429,6.35596 14.46429,14.19643 z"
sodipodi:ry="14.196428"
sodipodi:rx="14.464286"
sodipodi:cy="517.54077"
sodipodi:cx="425"
id="path3007-1"
style="fill:#000000;fill-opacity:1;stroke:none"
sodipodi:type="arc" />
<path
transform="matrix(0.16151528,0,0,0.16456275,406.08815,432.19425)"
d="m 439.46429,517.54077 c 0,7.84047 -6.47589,14.19643 -14.46429,14.19643 -7.9884,0 -14.46429,-6.35596 -14.46429,-14.19643 0,-7.84047 6.47589,-14.19643 14.46429,-14.19643 7.9884,0 14.46429,6.35596 14.46429,14.19643 z"
sodipodi:ry="14.196428"
sodipodi:rx="14.464286"
sodipodi:cy="517.54077"
sodipodi:cx="425"
id="path3007-0-4"
style="fill:#ffffff;fill-opacity:1;stroke:none"
sodipodi:type="arc" />
</g>
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:1.31862605;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889-1"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(0.5308556,0,0,0.5308556,229.63162,198.10213)" />
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:0.61952281;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889-4-1"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(1.1299019,0,0,1.1299019,-54.220053,-70.262937)" />
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:0.8002516;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889-5-5"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(0.83035093,0,0,0.83035093,87.718968,63.932058)" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.87783366px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 481.53079,442.83849 -0.0153,6.77692 c 9.55428,-0.16929 14.45853,-10.06218 12.50577,-19.31642 l -8.12484,3.61854 c 0.006,4.27743 -1.21305,6.01267 -4.23942,6.33245 z"
id="path3916-5-2-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc"
inkscape:transform-center-x="6.427012"
inkscape:transform-center-y="17.713434" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.87783366px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 480.46352,428.30022 0.0153,-6.77692 c -9.55428,0.16929 -14.45853,10.06218 -12.50577,19.31642 l 8.12484,-3.61854 c -0.006,-4.27743 1.21305,-6.01267 4.23942,-6.33245 z"
id="path3916-5-2-7-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc"
inkscape:transform-center-x="-6.4270161"
inkscape:transform-center-y="-17.713434" />
</g>
<g
transform="matrix(0.95191143,0,0,0.94999997,-63.034658,70.866904)"
id="g4123-1">
<g
id="g4004-4"
transform="translate(6.4397225,-81.443549)">
<path
transform="matrix(1.037037,0,0,1.0566038,33.991419,-29.473365)"
d="m 439.46429,517.54077 c 0,7.84047 -6.47589,14.19643 -14.46429,14.19643 -7.9884,0 -14.46429,-6.35596 -14.46429,-14.19643 0,-7.84047 6.47589,-14.19643 14.46429,-14.19643 7.9884,0 14.46429,6.35596 14.46429,14.19643 z"
sodipodi:ry="14.196428"
sodipodi:rx="14.464286"
sodipodi:cy="517.54077"
sodipodi:cx="425"
id="path3007-1-2"
style="fill:#000000;fill-opacity:1;stroke:none"
sodipodi:type="arc" />
<path
transform="matrix(0.16151528,0,0,0.16456275,406.08815,432.19425)"
d="m 439.46429,517.54077 c 0,7.84047 -6.47589,14.19643 -14.46429,14.19643 -7.9884,0 -14.46429,-6.35596 -14.46429,-14.19643 0,-7.84047 6.47589,-14.19643 14.46429,-14.19643 7.9884,0 14.46429,6.35596 14.46429,14.19643 z"
sodipodi:ry="14.196428"
sodipodi:rx="14.464286"
sodipodi:cy="517.54077"
sodipodi:cx="425"
id="path3007-0-4-3"
style="fill:#ffffff;fill-opacity:1;stroke:none"
sodipodi:type="arc" />
</g>
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:1.31862605;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889-1-2"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(0.5308556,0,0,0.5308556,229.63162,198.10213)" />
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:0.61952281;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889-4-1-2"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(1.1299019,0,0,1.1299019,-54.220053,-70.262937)" />
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:0.8002516;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889-5-5-1"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(0.83035093,0,0,0.83035093,87.718968,63.932058)" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.87783366px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 481.53079,442.83849 -0.0153,6.77692 c 9.55428,-0.16929 14.45853,-10.06218 12.50577,-19.31642 l -8.12484,3.61854 c 0.006,4.27743 -1.21305,6.01267 -4.23942,6.33245 z"
id="path3916-5-2-7-68"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc"
inkscape:transform-center-x="6.427012"
inkscape:transform-center-y="17.713434" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.87783366px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 480.46352,428.30022 0.0153,-6.77692 c -9.55428,0.16929 -14.45853,10.06218 -12.50577,19.31642 l 8.12484,-3.61854 c -0.006,-4.27743 1.21305,-6.01267 4.23942,-6.33245 z"
id="path3916-5-2-7-6-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc"
inkscape:transform-center-x="-6.4270161"
inkscape:transform-center-y="-17.713434" />
</g>
<g
transform="matrix(0.95191143,0,0,0.94999997,5.2301333,72.549709)"
id="g4113">
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:1;stroke:none"
id="path3007-7-8"
sodipodi:cx="425"
sodipodi:cy="517.54077"
sodipodi:rx="14.464286"
sodipodi:ry="14.196428"
d="m 439.46429,517.54077 c 0,7.84047 -6.47589,14.19643 -14.46429,14.19643 -7.9884,0 -14.46429,-6.35596 -14.46429,-14.19643 0,-7.84047 6.47589,-14.19643 14.46429,-14.19643 7.9884,0 14.46429,6.35596 14.46429,14.19643 z"
transform="matrix(1.382716,0,0,1.4088051,-152.12422,-294.96682)" />
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1.23868203;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3007-4-8"
sodipodi:cx="425"
sodipodi:cy="517.54077"
sodipodi:rx="14.464286"
sodipodi:ry="14.196428"
d="m 439.46429,517.54077 c 0,7.84047 -6.47589,14.19643 -14.46429,14.19643 -7.9884,0 -14.46429,-6.35596 -14.46429,-14.19643 0,-7.84047 6.47589,-14.19643 14.46429,-14.19643 7.9884,0 14.46429,6.35596 14.46429,14.19643 z"
transform="matrix(0.57659584,0,0,0.58747505,190.47685,130.10497)" />
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1;stroke:none"
id="path3007-0-2"
sodipodi:cx="425"
sodipodi:cy="517.54077"
sodipodi:rx="14.464286"
sodipodi:ry="14.196428"
d="m 439.46429,517.54077 c 0,7.84047 -6.47589,14.19643 -14.46429,14.19643 -7.9884,0 -14.46429,-6.35596 -14.46429,-14.19643 0,-7.84047 6.47589,-14.19643 14.46429,-14.19643 7.9884,0 14.46429,6.35596 14.46429,14.19643 z"
transform="matrix(0.27721059,0,0,0.282441,317.71558,287.97253)" />
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:0.66094333;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(1.0590923,0,0,1.0590923,-66.309468,-40.31252)" />
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:0.44283628;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889-4"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(1.5807196,0,0,1.5807196,-313.47698,-273.99486)" />
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:0.53326446;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3889-5"
sodipodi:cx="473.83929"
sodipodi:cy="447.98718"
sodipodi:rx="10.982142"
sodipodi:ry="10.982142"
d="m 484.82144,447.98718 c 0,6.06527 -4.91688,10.98215 -10.98215,10.98215 -6.06527,0 -10.98214,-4.91688 -10.98214,-10.98215 0,-6.06527 4.91687,-10.98214 10.98214,-10.98214 6.06527,0 10.98215,4.91687 10.98215,10.98214 z"
transform="matrix(1.3126696,0,0,1.3126696,-186.46436,-153.9119)" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.14413512px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 436.31917,443.49132 -0.10217,8.33905 c 12.45268,-0.22064 18.92699,-12.29179 16.38184,-24.35342 l -7.29812,4.63399 c 1.81826,5.98647 -4.04967,10.71674 -8.98155,11.38038 z"
id="path3916-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc"
inkscape:transform-center-x="8.3767009"
inkscape:transform-center-y="23.087015" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.14413512px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 434.01553,424.88159 0.48098,-8.21278 c -12.45268,0.22064 -18.92699,12.29179 -16.38184,24.35342 l 8.05573,-3.62383 c -1.81826,-5.98647 2.91325,-11.85317 7.84513,-12.51681 z"
id="path3916-5-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc"
inkscape:transform-center-x="-8.3766982"
inkscape:transform-center-y="-23.087015" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100"
height="100"
id="svg2"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="New document 1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
inkscape:cx="56.013691"
inkscape:cy="69.593676"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1003"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-277.5,-381.16879)">
<g
id="g3797"
inkscape:export-filename="C:\Users\Jon\SkyDrive\Projects\Git\MvcMusicStore\MvcMusicStore\Content\Images\placeholder.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<rect
y="381.16879"
x="277.5"
height="100"
width="100"
id="rect3017"
style="fill:#ffffff;fill-opacity:1" />
<g
transform="translate(2.0535545,-3.2469826)"
id="g3787">
<rect
style="fill:#edecb3;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.15819502px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="rect2998"
width="78.591805"
height="78.591805"
x="286.15054"
y="395.11987" />
<g
style="font-size:10.29434204px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#90905a;fill-opacity:1;stroke:none;font-family:Segoe UI;-inkscape-font-specification:Segoe UI"
id="text3000">
<path
inkscape:connector-curvature="0"
d="m 290.05246,405.88284 0,-0.99526 c 0.11393,0.10054 0.25048,0.19101 0.40966,0.27144 0.15917,0.0804 0.32672,0.14828 0.50265,0.20357 0.17593,0.0553 0.35269,0.098 0.5303,0.12818 0.1776,0.0302 0.3418,0.0452 0.4926,0.0452 0.51941,0 0.90729,-0.0963 1.16364,-0.28903 0.25635,-0.19268 0.38453,-0.46998 0.38453,-0.83189 0,-0.19436 -0.0427,-0.36358 -0.12817,-0.50768 -0.0855,-0.14409 -0.20358,-0.27562 -0.35437,-0.39458 -0.1508,-0.11896 -0.32925,-0.2329 -0.53533,-0.34181 -0.20609,-0.1089 -0.4281,-0.22367 -0.66602,-0.34431 -0.25132,-0.12734 -0.4859,-0.25635 -0.70371,-0.38705 -0.21782,-0.13068 -0.40715,-0.27478 -0.568,-0.43228 -0.16085,-0.15749 -0.28735,-0.33593 -0.3795,-0.53533 -0.0922,-0.19938 -0.13823,-0.43311 -0.13823,-0.7012 0,-0.32839 0.072,-0.61407 0.21614,-0.85702 0.14409,-0.24294 0.33342,-0.44317 0.568,-0.60067 0.23457,-0.15749 0.50181,-0.27478 0.80173,-0.35186 0.29991,-0.0771 0.60569,-0.1156 0.91734,-0.11561 0.71042,1e-5 1.22815,0.0855 1.5532,0.25635 l 0,0.95002 c -0.42558,-0.29488 -0.9718,-0.44233 -1.63865,-0.44234 -0.18431,10e-6 -0.36861,0.0193 -0.55292,0.0578 -0.18431,0.0385 -0.34851,0.10137 -0.4926,0.18849 -0.14409,0.0871 -0.26138,0.1994 -0.35186,0.33678 -0.0905,0.1374 -0.13571,0.30495 -0.13571,0.50266 0,0.18431 0.0343,0.34348 0.10304,0.47752 0.0687,0.13404 0.17006,0.25635 0.30411,0.36693 0.13404,0.11059 0.2974,0.21782 0.49008,0.3217 0.19269,0.10389 0.41469,0.21782 0.66602,0.34181 0.25803,0.12734 0.50265,0.26138 0.73387,0.40212 0.23122,0.14074 0.43396,0.29657 0.60821,0.46747 0.17425,0.1709 0.31248,0.36023 0.41469,0.56799 0.10221,0.20777 0.15331,0.44569 0.15331,0.71377 0,0.35521 -0.0695,0.65597 -0.2086,0.90226 -0.13907,0.24631 -0.32673,0.44653 -0.56297,0.60068 -0.23625,0.15414 -0.50852,0.26556 -0.81681,0.33426 -0.3083,0.0687 -0.63335,0.10304 -0.97515,0.10304 -0.11394,0 -0.25468,-0.009 -0.42223,-0.0276 -0.16755,-0.0184 -0.33845,-0.0452 -0.5127,-0.0804 -0.17426,-0.0352 -0.3393,-0.0788 -0.49512,-0.13069 -0.15582,-0.0519 -0.28065,-0.10974 -0.37447,-0.17341 z"
id="path3005" />
<path
inkscape:connector-curvature="0"
d="m 299.43197,406.17438 -0.82435,0 0,-0.80425 -0.0201,0 c -0.35856,0.61659 -0.88635,0.92488 -1.58336,0.92488 -0.51271,0 -0.91399,-0.13571 -1.20385,-0.40715 -0.28987,-0.27143 -0.4348,-0.63166 -0.4348,-1.0807 0,-0.96174 0.56632,-1.52136 1.69897,-1.67886 l 1.54315,-0.21614 c -10e-6,-0.87462 -0.35354,-1.31192 -1.0606,-1.31193 -0.61994,10e-6 -1.17956,0.21112 -1.67886,0.63334 l 0,-0.84445 c 0.506,-0.3217 1.08908,-0.48255 1.74923,-0.48255 1.20971,0 1.81457,0.64005 1.81458,1.92014 z m -0.82435,-2.60375 -1.24156,0.1709 c -0.38202,0.0536 -0.6702,0.14829 -0.86456,0.284 -0.19436,0.13572 -0.29154,0.37616 -0.29154,0.72131 0,0.25133 0.0896,0.45658 0.26892,0.61575 0.17928,0.15918 0.41804,0.23876 0.71628,0.23876 0.40882,0 0.74644,-0.14325 1.01285,-0.42977 0.2664,-0.28651 0.3996,-0.64926 0.39961,-1.08824 z"
id="path3007" />
<path
inkscape:connector-curvature="0"
d="m 308.3038,406.17438 -0.82435,0 0,-2.9556 c -10e-6,-0.56968 -0.088,-0.98185 -0.26389,-1.23653 -0.17594,-0.25468 -0.47167,-0.38201 -0.88719,-0.38202 -0.35186,10e-6 -0.65094,0.16085 -0.89723,0.48255 -0.24631,0.3217 -0.36946,0.70707 -0.36945,1.1561 l 0,2.9355 -0.82436,0 0,-3.05614 c 0,-1.012 -0.39039,-1.518 -1.17118,-1.51801 -0.36191,10e-6 -0.66015,0.15164 -0.89472,0.4549 -0.23457,0.30327 -0.35186,0.69786 -0.35186,1.18375 l 0,2.9355 -0.82435,0 0,-5.14717 0.82435,0 0,0.81429 0.0201,0 c 0.36526,-0.62328 0.89807,-0.93493 1.59844,-0.93493 0.35185,0 0.65847,0.098 0.91985,0.29405 0.26138,0.19604 0.44066,0.45323 0.53784,0.77157 0.38201,-0.71041 0.95169,-1.06562 1.70902,-1.06562 1.13264,0 1.69896,0.69869 1.69897,2.09606 z"
id="path3009" />
<path
inkscape:connector-curvature="0"
d="m 310.70648,405.43045 -0.0201,0 0,3.11143 -0.82435,0 0,-7.51467 0.82435,0 0,0.90477 0.0201,0 c 0.40548,-0.6836 0.99861,-1.02541 1.7794,-1.02541 0.6635,0 1.18123,0.23039 1.5532,0.69115 0.37195,0.46077 0.55794,1.07819 0.55794,1.85228 0,0.86121 -0.20944,1.55068 -0.62831,2.06841 -0.41889,0.51774 -0.99191,0.7766 -1.71908,0.7766 -0.66686,0 -1.18124,-0.28818 -1.54315,-0.86456 z m -0.0201,-2.07596 0,0.7188 c 0,0.42558 0.13823,0.78665 0.41469,1.08321 0.27645,0.29657 0.62747,0.44485 1.05306,0.44485 0.4993,0 0.89053,-0.191 1.17369,-0.57302 0.28316,-0.38202 0.42474,-0.91315 0.42474,-1.59341 0,-0.57303 -0.13237,-1.02206 -0.39709,-1.34711 -0.26474,-0.32505 -0.6233,-0.48757 -1.07568,-0.48758 -0.4792,10e-6 -0.86457,0.16672 -1.1561,0.50014 -0.29154,0.33343 -0.43731,0.75147 -0.43731,1.25412 z"
id="path3011" />
<path
inkscape:connector-curvature="0"
d="m 316.73833,406.17438 -0.82436,0 0,-7.62023 0.82436,0 z"
id="path3013" />
<path
inkscape:connector-curvature="0"
d="m 322.54397,403.80688 -3.63418,0 c 0.0134,0.57303 0.16755,1.01536 0.46244,1.327 0.29489,0.31165 0.70036,0.46747 1.21642,0.46747 0.57972,0 1.11254,-0.191 1.59844,-0.57302 l 0,0.77408 c -0.45239,0.3284 -1.05055,0.4926 -1.79448,0.4926 -0.72717,0 -1.29852,-0.23373 -1.71404,-0.7012 -0.41553,-0.46746 -0.62329,-1.1251 -0.62329,-1.97291 0,-0.80089 0.22703,-1.4535 0.68109,-1.95784 0.45406,-0.50432 1.01787,-0.75649 1.69143,-0.75649 0.67355,0 1.19464,0.21782 1.56325,0.65345 0.36861,0.43564 0.55292,1.0405 0.55292,1.81458 z m -0.84446,-0.69869 c -0.003,-0.47584 -0.11812,-0.84613 -0.34431,-1.11086 -0.2262,-0.26473 -0.54036,-0.39709 -0.94248,-0.3971 -0.38872,10e-6 -0.7188,0.13907 -0.99023,0.4172 -0.27143,0.27814 -0.43898,0.64173 -0.50265,1.09076 z"
id="path3015" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -0,0 +1,63 @@
using System.ComponentModel.DataAnnotations;
namespace MvcMusicStore.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; }
}
}

View File

@ -0,0 +1,34 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace MvcMusicStore.Models
{
public class Album {
[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]
[Range(0.01, 100.00)]
[DataType(DataType.Currency)]
public decimal Price { get; set; }
[DisplayName("Album Art URL")]
[StringLength(1024)]
public string AlbumArtUrl { get; set; }
public virtual Genre Genre { get; set; }
public virtual Artist Artist { get; set; }
public virtual List<OrderDetail> OrderDetails { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MvcMusicStore.Models
{
public class Artist
{
public int ArtistId { get; set; }
public string Name { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace MvcMusicStore.Models
{
public class Cart
{
[Key]
public int RecordId { get; set; }
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; }
}
}

View File

@ -0,0 +1,12 @@
using System.Collections.Generic;
namespace MvcMusicStore.Models
{
public class Genre
{
public int GenreId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public List<Album> Albums { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using Microsoft.AspNet.Identity.EntityFramework;
namespace MvcMusicStore.Models
{
// You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
public class ApplicationUser : IdentityUser
{
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection")
{
}
}
}

View File

@ -0,0 +1,14 @@
using System.Data.Entity;
namespace MvcMusicStore.Models
{
public class MusicStoreEntities : DbContext
{
public DbSet<Album> Albums { get; set; }
public DbSet<Genre> Genres { get; set; }
public DbSet<Artist> Artists { get; set; }
public DbSet<Cart> Carts { get; set; }
public DbSet<Order> Orders { get; set; }
public DbSet<OrderDetail> OrderDetails { get; set; }
}
}

View File

@ -0,0 +1,68 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
namespace MvcMusicStore.Models
{
[Bind(Include = "FirstName,LastName,Address,City,State,PostalCode,Country,Phone,Email")]
public class Order
{
[ScaffoldColumn(false)]
public int OrderId { get; set; }
[ScaffoldColumn(false)]
public System.DateTime OrderDate { get; set; }
[ScaffoldColumn(false)]
public string Username { get; set; }
[Required]
[DisplayName("First Name")]
[StringLength(160)]
public string FirstName { get; set; }
[Required]
[DisplayName("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]
[DisplayName("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]
[DisplayName("Email Address")]
[RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}",
ErrorMessage = "Email is is not valid.")]
[DataType(DataType.EmailAddress)]
public string Email { get; set; }
[ScaffoldColumn(false)]
public decimal Total { get; set; }
public List<OrderDetail> OrderDetails { get; set; }
}
}

View File

@ -0,0 +1,14 @@
namespace MvcMusicStore.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; }
}
}

View File

@ -0,0 +1,827 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
namespace MvcMusicStore.Models
{
public class SampleData : DropCreateDatabaseIfModelChanges<MusicStoreEntities>
{
protected override void Seed(MusicStoreEntities context)
{
const string imgUrl = "~/Images/placeholder.png";
var genres = AddGenres(context);
var artists = AddArtists(context);
AddAlbums(context, imgUrl, genres, artists);
context.SaveChanges();
}
private static void AddAlbums(MusicStoreEntities context, string imgUrl, List<Genre> genres, List<Artist> artists)
{
context.Albums.Add(new Album { Title = "The Best Of The Men At Work", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Men At Work"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "...And Justice For All", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "עד גבול האור", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "אריק אינשטיין"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black Light Syndrome", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Terry Bozzio, Tony Levin & Steve Stevens"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "10,000 Days", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tool"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "11i", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Supreme Beings of Leisure"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "1960", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Soul-Junk"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "4x4=12 ", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "deadmau5"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Copland Celebration, Vol. I", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "London Symphony Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Lively Mind", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paul Oakenfold"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Matter of Life and Death", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Real Dead One", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Real Live One", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Rush of Blood to the Head", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Coldplay"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Soprano Inspired", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Britten Sinfonia, Ivor Bolton & Lesley Garrett"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A Winter Symphony", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Abbey Road", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Beatles"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ace Of Spades", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Motörhead"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Achtung Baby", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Acústico MTV", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Os Paralamas Do Sucesso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Adams, John: The Chairman Dances", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Edo de Waart & San Francisco Symphony"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Adrenaline", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deftones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ænima", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tool"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Afrociberdelia", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chico Science & Nação Zumbi"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "After the Goldrush", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Neil Young"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Airdrawn Dagger", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sasha"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Album Title Goes Here", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "deadmau5"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 1]", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Black Label Society"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 2]", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Black Label Society"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Alive 2007", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Daft Punk"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "All I Ask of You", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Amen (So Be It)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paddy Casey"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Animal Vehicle", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Axis of Awesome"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ao Vivo [IMPORT]", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Zeca Pagodinho"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Apocalyptic Love", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Slash"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Appetite for Destruction", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Guns N' Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Are You Experienced?", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jimi Hendrix"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Arquivo II", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Os Paralamas Do Sucesso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Arquivo Os Paralamas Do Sucesso", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Os Paralamas Do Sucesso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "A-Sides", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Soundgarden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Audioslave", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Audioslave"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Automatic for the People", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "R.E.M."), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Axé Bahia 2001", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Various Artists"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Babel", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Mumford & Sons"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bach: Goldberg Variations", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Wilhelm Kempff"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bach: The Brandenburg Concertos", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Orchestra of The Age of Enlightenment"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bach: The Cello Suites", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Yo-Yo Ma"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bach: Toccata & Fugue in D Minor", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ton Koopman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bad Motorfinger", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Soundgarden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Balls to the Wall", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Accept"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Banadeek Ta'ala", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amr Diab"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Barbie Girl", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Aqua"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bark at the Moon (Remastered)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bartok: Violin & Viola Concertos", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Yehudi Menuhin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Barulhinho Bom", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Marisa Monte"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "BBC Sessions [Disc 1] [Live]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "BBC Sessions [Disc 2] [Live]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Be Here Now", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Oasis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bedrock 11 Compiled & Mixed", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "John Digweed"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Berlioz: Symphonie Fantastique", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Michael Tilson Thomas"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Beyond Good And Evil", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Cult"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Big Bad Wolf ", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Armand Van Helden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Big Ones", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Aerosmith"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black Album", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black Sabbath Vol. 4 (Remaster)", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Black Sabbath"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black Sabbath", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Black Sabbath"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Black", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blackwater Park", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Opeth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blizzard of Ozz", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blood", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "In This Moment"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blue Moods", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Incognito"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Blue", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Weezer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bongo Fury", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Frank Zappa & Captain Beefheart"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Boys & Girls", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alabama Shakes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Brave New World", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "B-Sides 1980-1990", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Bunkka", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paul Oakenfold"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "By The Way", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Red Hot Chili Peppers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cake: B-Sides and Rarities", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cake"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Californication", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Red Hot Chili Peppers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Carmina Burana", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Boston Symphony Orchestra & Seiji Ozawa"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Carried to Dust (Bonus Track Version)", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Calexico"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Carry On", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chris Cornell"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cássia Eller - Sem Limite [Disc 1]", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cássia Eller"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chemical Wedding", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Bruce Dickinson"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chill: Brazil (Disc 1)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Marcos Valle"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chill: Brazil (Disc 2)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Antônio Carlos Jobim"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chocolate Starfish And The Hot Dog Flavored Water", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Limp Bizkit"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chronicle, Vol. 1", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Creedence Clearwater Revival"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Chronicle, Vol. 2", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Creedence Clearwater Revival"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ciao, Baby", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "TheStart"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cidade Negra - Hits", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cidade Negra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Classic Munkle: Turbo Edition", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Munkle"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Classics: The Best of Sarah Brightman", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Coda", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Come Away With Me", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Norah Jones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Come Taste The Band", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Comfort Eagle", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cake"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Common Reaction", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Uh Huh Her "), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Compositores", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "O Terço"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Contraband", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Velvet Revolver"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Core", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Stone Temple Pilots"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cornerstone", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Styx"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cosmicolor", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "M-Flo"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Cross", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Justice"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Culture of Fear", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Thievery Corporation"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Da Lama Ao Caos", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chico Science & Nação Zumbi"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Dakshina", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deva Premal"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Dark Side of the Moon", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pink Floyd"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Death Magnetic", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Deep End of Down", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Above the Fold"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Deep Purple In Rock", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Deixa Entrar", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Falamansa"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Deja Vu", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Crosby, Stills, Nash, and Young"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Di Korpu Ku Alma", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lura"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Diary of a Madman (Remastered)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Diary of a Madman", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Dirt", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alice in Chains"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Diver Down", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Djavan Ao Vivo - Vol. 02", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Djavan"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Djavan Ao Vivo - Vol. 1", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Djavan"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Drum'n'bass for Papa", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Plug"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Duluth", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Trampled By Turtles"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Dummy", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Portishead"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Duos II", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Luciana Souza/Romero Lubambo"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Earl Scruggs and Friends", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Earl Scruggs"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Eden", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "El Camino", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Keys"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Elegant Gypsy", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Al di Meola"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Elements Of Life", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tiësto"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Elis Regina-Minha História", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Elis Regina"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Emergency On Planet Earth", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jamiroquai"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Emotion", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Papa Wemba"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "English Renaissance", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The King's Singers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Every Kind of Light", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Posies"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Faceless", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Godsmack"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Facelift", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alice in Chains"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fair Warning", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fear of a Black Planet", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Public Enemy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fear Of The Dark", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Feels Like Home", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Norah Jones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fireball", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Fly", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "For Those About To Rock We Salute You", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "AC/DC"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Four", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Blues Traveler"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Frank", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amy Winehouse"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Further Down the Spiral", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nine Inch Nails"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Garage Inc. (Disc 1)", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Garage Inc. (Disc 2)", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Garbage", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Garbage"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Good News For People Who Love Bad News", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Modest Mouse"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Gordon", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Barenaked Ladies"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Górecki: Symphony No. 3", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Adrian Leaper & Doreen de Feis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits I", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits II", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Duck Sauce"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lenny Kravitz"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Hits", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lenny Kravitz"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greatest Kiss", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Kiss"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Greetings from Michigan", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sufjan Stevens"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Group Therapy", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Above & Beyond"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Handel: The Messiah (Highlights)", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Scholars Baroque Ensemble"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Haydn: Symphonies 99 - 104", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Royal Philharmonic Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Heart of the Night", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Spyro Gyra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Heart On", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Eagles of Death Metal"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Holy Diver", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dio"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Homework", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Daft Punk"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Hot Rocks, 1964-1971 (Disc 1)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Rolling Stones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Houses Of The Holy", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "How To Dismantle An Atomic Bomb", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Human", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Projected"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Hunky Dory", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "David Bowie"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Hymns", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Projected"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Hysteria", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Def Leppard"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Absentia", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Porcupine Tree"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Between", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paul Van Dyk"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Rainbows", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Radiohead"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Step", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Stevie Ray Vaughan & Double Trouble"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In the court of the Crimson King", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "King Crimson"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Through The Out Door", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Your Honor [Disc 1]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Foo Fighters"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "In Your Honor [Disc 2]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Foo Fighters"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Indestructible", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Rancid"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Infinity", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Journey"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Into The Light", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "David Coverdale"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Introspective", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pet Shop Boys"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Iron Maiden", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "ISAM", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amon Tobin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "IV", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Jagged Little Pill", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alanis Morissette"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Jagged Little Pill", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alanis Morissette"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Jorge Ben Jor 25 Anos", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jorge Ben"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Jota Quest-1995", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jota Quest"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Kick", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "INXS"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Kill 'Em All", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Kind of Blue", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Miles Davis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "King For A Day Fool For A Lifetime", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Faith No More"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Kiss", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Carly Rae Jepsen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Last Call", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cayouche"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Le Freak", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chic"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Le Tigre", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Le Tigre"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Led Zeppelin I", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Led Zeppelin II", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Led Zeppelin III", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Let There Be Rock", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "AC/DC"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Little Earthquakes", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tori Amos"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live [Disc 1]", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Crowes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live [Disc 2]", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Crowes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live After Death", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live At Donington 1992 (Disc 1)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live At Donington 1992 (Disc 2)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live on Earth", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Cat Empire"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Live On Two Legs [Live]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pearl Jam"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Living After Midnight", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Judas Priest"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Living", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paddy Casey"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Load", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Love Changes Everything", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "MacArthur Park Suite", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Donna Summer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Machine Head", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Magical Mystery Tour", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Beatles"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mais Do Mesmo", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Legião Urbana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Maquinarama", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Skank"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Marasim", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jagjit Singh"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mascagni: Cavalleria Rusticana", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "James Levine"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Master of Puppets", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mechanics & Mathematics", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Venus Hum"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mental Jewelry", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Live"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Metallics", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "meteora", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Linkin Park"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Meus Momentos", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Gonzaguinha"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mezmerize", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "System Of A Down"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mezzanine", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Massive Attack"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Miles Ahead", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Miles Davis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Milton Nascimento Ao Vivo", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Milton Nascimento"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Minas", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Milton Nascimento"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Minha Historia", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chico Buarque"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Misplaced Childhood", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Marillion"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "MK III The Final Concerts [Disc 1]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Morning Dance", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Spyro Gyra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Motley Crue Greatest Hits", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Mötley Crüe"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Moving Pictures", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Rush"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mozart: Chamber Music", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nash Ensemble"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Mozart: Symphonies Nos. 40 & 41", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Berliner Philharmoniker"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Murder Ballads", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nick Cave and the Bad Seeds"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Music For The Jilted Generation", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Prodigy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "My Generation - The Very Best Of The Who", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Who"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "My Name is Skrillex", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Skrillex"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Na Pista", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Cláudio Zoli"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Nevermind", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nirvana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "New Adventures In Hi-Fi", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "R.E.M."), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "New Divide", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Linkin Park"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "New York Dolls", Genre = genres.Single(g => g.Name == "Punk"), Price = 8.99M, Artist = artists.Single(a => a.Name == "New York Dolls"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "News Of The World", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Nielsen: The Six Symphonies", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Göteborgs Symfoniker & Neeme Järvi"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Night At The Opera", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Night Castle", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Trans-Siberian Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Nkolo", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lokua Kanza"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "No More Tears (Remastered)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "No Prayer For The Dying", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "No Security", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Rolling Stones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "O Brother, Where Art Thou?", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Alison Krauss"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "O Samba Poconé", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Skank"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "O(+>", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Prince"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Oceania", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Smashing Pumpkins"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Off the Deep End", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Weird Al"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "OK Computer", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Radiohead"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Olodum", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Olodum"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "One Love", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "David Guetta"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Operation: Mindcrime", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Queensrÿche"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Opiate", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tool"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Outbreak", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dennis Chambers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pachelbel: Canon & Gigue", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "English Concert & Trevor Pinnock"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Paid in Full", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eric B. and Rakim"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Para Siempre", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Vicente Fernandez"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pause", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Four Tet"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Peace Sells... but Who's Buying", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Megadeth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Physical Graffiti [Disc 1]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Physical Graffiti [Disc 2]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Physical Graffiti", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Piece Of Mind", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pinkerton", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Weezer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Plays Metallica By Four Cellos", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Apocalyptica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pop", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Powerslave", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Prenda Minha", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Caetano Veloso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Presence", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Pretty Hate Machine", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nine Inch Nails"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Prisoner", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Jezabels"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Privateering", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Mark Knopfler"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Prokofiev: Romeo & Juliet", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Michael Tilson Thomas"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Prokofiev: Symphony No.1", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sergei Prokofiev & Yuri Temirkanov"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "PSY's Best 6th Part 1", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "PSY"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Purcell: The Fairy Queen", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "London Classical Players"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Purpendicular", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Purple", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Stone Temple Pilots"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Quanta Gente Veio Ver (Live)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Gilberto Gil"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Quanta Gente Veio ver--Bônus De Carnaval", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Gilberto Gil"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Quiet Songs", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Aisha Duo"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Raices", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Los Tigres del Norte"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Raising Hell", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Run DMC"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Raoul and the Kings of Spain ", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tears For Fears"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rattle And Hum", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Raul Seixas", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Raul Seixas"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Recovery [Explicit]", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eminem"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Reign In Blood", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Slayer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Relayed", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Yes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "ReLoad", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Respighi:Pines of Rome", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eugene Ormandy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Restless and Wild", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Accept"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Retrospective I (1974-1980)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Rush"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Revelations", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Audioslave"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Revolver", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Beatles"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ride the Lighting ", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ride The Lightning", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ring My Bell", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Anita Ward"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Riot Act", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pearl Jam"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rise of the Phoenix", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Before the Dawn"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rock In Rio [CD1]", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rock In Rio [CD2]", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rock In Rio [CD2]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Roda De Funk", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Funk Como Le Gusta"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Room for Squares", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "John Mayer"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Root Down", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jimmy Smith"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rounds", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Four Tet"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rubber Factory", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Keys"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Rust in Peace", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Megadeth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Sambas De Enredo 2001", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Various Artists"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Santana - As Years Go By", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Santana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Santana Live", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Santana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Saturday Night Fever", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Bee Gees"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Scary Monsters and Nice Sprites", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Skrillex"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Scheherazade", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chicago Symphony Orchestra & Fritz Reiner"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "SCRIABIN: Vers la flamme", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Christopher O'Riley"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Second Coming", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Stone Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Serie Sem Limite (Disc 1)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tim Maia"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Serie Sem Limite (Disc 2)", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tim Maia"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Serious About Men", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Rubberbandits"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Seventh Son of a Seventh Son", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Short Bus", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Filter"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Sibelius: Finlandia", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Berliner Philharmoniker"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Singles Collection", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "David Bowie"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Six Degrees of Inner Turbulence", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dream Theater"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Slave To The Empire", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "T&N"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Slaves And Masters", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Slouching Towards Bethlehem", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Robert James"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Smash", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Offspring"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Something Special", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dolly Parton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Somewhere in Time", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Song(s) You Know By Heart", Genre = genres.Single(g => g.Name == "Country"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Jimmy Buffett"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Sound of Music", Genre = genres.Single(g => g.Name == "Punk"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Adicts"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "South American Getaway", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The 12 Cellists of The Berlin Philharmonic"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Sozinho Remix Ao Vivo", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Caetano Veloso"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Speak of the Devil", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Spiritual State", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nujabes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "St. Anger", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Metallica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Still Life", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Opeth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Stop Making Sense", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Talking Heads"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Stormbringer", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Stranger than Fiction", Genre = genres.Single(g => g.Name == "Punk"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Bad Religion"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Strauss: Waltzes", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eugene Ormandy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Supermodified", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amon Tobin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Supernatural", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Santana"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Surfing with the Alien (Remastered)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Joe Satriani"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Switched-On Bach", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Wendy Carlos"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Symphony", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Szymanowski: Piano Works, Vol. 1", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Martin Roscoe"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tchaikovsky: The Nutcracker", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "London Symphony Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ted Nugent", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ted Nugent"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Teflon Don", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Rick Ross"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tell Another Joke at the Ol' Choppin' Block", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Danielson Famile"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Temple of the Dog", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Temple of the Dog"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Ten", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pearl Jam"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Texas Flood", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Stevie Ray Vaughan"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Battle Rages On", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Beast Live", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Paul D'Ianno"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best Of 1980-1990", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best of 19902000", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best of Beethoven", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Nicolaus Esterhazy Sinfonia"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best Of Billy Cobham", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Billy Cobham"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best of Ed Motta", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ed Motta"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Best Of Van Halen, Vol. I", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Bridge", Genre = genres.Single(g => g.Name == "R&B"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Melanie Fiona"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Cage", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tygers of Pan Tang"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Chicago Transit Authority", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Chicago "), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Chronic", Genre = genres.Single(g => g.Name == "Rap"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dr. Dre"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Colour And The Shape", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Foo Fighters"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Crane Wife", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Decemberists"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Cream Of Clapton", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eric Clapton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Cure", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Cure"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Dark Side Of The Moon", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pink Floyd"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Divine Conspiracy", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Epica"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Doors", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Doors"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Dream of the Blue Turtles", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sting"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Essential Miles Davis [Disc 1]", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Miles Davis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Essential Miles Davis [Disc 2]", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Miles Davis"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Final Concerts (Disc 2)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deep Purple"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Final Frontier", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Head and the Heart", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Head and the Heart"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Joshua Tree", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Last Night of the Proms", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "BBC Concert Orchestra"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Lumineers", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Lumineers"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Number of The Beast", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Number of The Beast", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Police Greatest Hits", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Police"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Song Remains The Same (Disc 1)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Song Remains The Same (Disc 2)", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Southern Harmony and Musical Companion", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Black Crowes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Spade", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Butch Walker & The Black Widows"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Stone Roses", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Stone Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Suburbs", Genre = genres.Single(g => g.Name == "Indie"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Arcade Fire"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Three Tenors Disc1/Disc2", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Carreras, Pavarotti, Domingo"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Trees They Grow So High", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The Wall", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pink Floyd"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "The X Factor", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Them Crooked Vultures", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Them Crooked Vultures"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "This Is Happening", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "LCD Soundsystem"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Thunder, Lightning, Strike", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Go! Team"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Time to Say Goodbye", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sarah Brightman"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Time, Love & Tenderness", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Michael Bolton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tomorrow Starts Today", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Mobile"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tribute", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Ozzy Osbourne"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Tuesday Night Music Club", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sheryl Crow"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Umoja", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "BLØF"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Under the Pink", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tori Amos"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Undertow", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Tool"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Un-Led-Ed", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Dread Zeppelin"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Unplugged [Live]", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Kiss"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Unplugged", Genre = genres.Single(g => g.Name == "Blues"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eric Clapton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Unplugged", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Eric Clapton"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Untrue", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Burial"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Use Your Illusion I", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Guns N' Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Use Your Illusion II", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Guns N' Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Use Your Illusion II", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Guns N' Roses"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Van Halen III", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Van Halen", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Van Halen"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Version 2.0", Genre = genres.Single(g => g.Name == "Alternative"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Garbage"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Vinicius De Moraes", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Vinícius De Moraes"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Virtual XI", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Iron Maiden"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Voodoo Lounge", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Rolling Stones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Vozes do MPB", Genre = genres.Single(g => g.Name == "Latin"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Various Artists"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Vs.", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pearl Jam"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Wagner: Favourite Overtures", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sir Georg Solti & Wiener Philharmoniker"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Walking Into Clarksdale", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Page & Plant"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Wapi Yo", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Lokua Kanza"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "War", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Warner 25 Anos", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Antônio Carlos Jobim"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Wasteland R&Btheque", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Raunchy"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Watermark", Genre = genres.Single(g => g.Name == "Electronic"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Enya"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "We Were Exploding Anyway", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "65daysofstatic"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Weill: The Seven Deadly Sins", Genre = genres.Single(g => g.Name == "Classical"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Orchestre de l'Opéra de Lyon"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "White Pony", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Deftones"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Who's Next", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Who"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Wish You Were Here", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Pink Floyd"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "With Oden on Our Side", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Amon Amarth"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Worlds", Genre = genres.Single(g => g.Name == "Jazz"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Aaron Goldberg"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Worship Music", Genre = genres.Single(g => g.Name == "Metal"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Anthrax"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "X&Y", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Coldplay"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Xinti", Genre = genres.Single(g => g.Name == "World"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Sara Tavares"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Yano", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Yano"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Yesterday Once More Disc 1/Disc 2", Genre = genres.Single(g => g.Name == "Pop"), Price = 8.99M, Artist = artists.Single(a => a.Name == "The Carpenters"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Zooropa", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "U2"), AlbumArtUrl = imgUrl });
context.Albums.Add(new Album { Title = "Zoso", Genre = genres.Single(g => g.Name == "Rock"), Price = 8.99M, Artist = artists.Single(a => a.Name == "Led Zeppelin"), AlbumArtUrl = imgUrl });
}
private static List<Artist> AddArtists(MusicStoreEntities context)
{
var artists = new List<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 = "אריק אינשטיין"}
};
artists.ForEach(s => context.Artists.Add(s));
context.SaveChanges();
return artists;
}
private static List<Genre> AddGenres(MusicStoreEntities context)
{
var genres = new List<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.ForEach(s => context.Genres.Add(s));
context.SaveChanges();
return genres;
}
}
}

View File

@ -0,0 +1,195 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MvcMusicStore.Models
{
public partial class ShoppingCart
{
MusicStoreEntities _db;
string ShoppingCartId { get; set; }
public ShoppingCart(MusicStoreEntities db)
{
_db = db;
}
public const string CartSessionKey = "CartId";
public static ShoppingCart GetCart(MusicStoreEntities db, HttpContextBase context)
{
var cart = new ShoppingCart(db);
cart.ShoppingCartId = cart.GetCartId(context);
return cart;
}
// Helper method to simplify shopping cart calls
public static ShoppingCart GetCart(MusicStoreEntities db, Controller controller)
{
return GetCart(db, controller.HttpContext);
}
public void AddToCart(Album album)
{
// Get the matching cart and album instances
var cartItem = _db.Carts.SingleOrDefault(
c => c.CartId == ShoppingCartId
&& c.AlbumId == album.AlbumId);
if (cartItem == null)
{
// Create a new cart item if no cart item exists
cartItem = new Cart
{
AlbumId = album.AlbumId,
CartId = ShoppingCartId,
Count = 1,
DateCreated = DateTime.Now
};
_db.Carts.Add(cartItem);
}
else
{
// If the item does exist in the cart, then add one to the quantity
cartItem.Count++;
}
}
public int RemoveFromCart(int id)
{
// Get the cart
var cartItem = _db.Carts.Single(
cart => cart.CartId == ShoppingCartId
&& cart.RecordId == id);
int itemCount = 0;
if (cartItem != null)
{
if (cartItem.Count > 1)
{
cartItem.Count--;
itemCount = cartItem.Count;
}
else
{
_db.Carts.Remove(cartItem);
}
}
return itemCount;
}
public void EmptyCart()
{
var cartItems = _db.Carts.Where(cart => cart.CartId == ShoppingCartId);
foreach (var cartItem in cartItems)
{
_db.Carts.Remove(cartItem);
}
}
public List<Cart> GetCartItems()
{
return _db.Carts.Where(cart => cart.CartId == ShoppingCartId).ToList();
}
public int GetCount()
{
// Get the count of each item in the cart and sum them up
int? count = (from cartItems in _db.Carts
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
decimal? total = (from cartItems in _db.Carts
where cartItems.CartId == ShoppingCartId
select (int?)cartItems.Count * cartItems.Album.Price).Sum();
return total ?? decimal.Zero;
}
public int CreateOrder(Order order)
{
decimal orderTotal = 0;
var cartItems = GetCartItems();
// 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 orderDetail = new OrderDetail
{
AlbumId = item.AlbumId,
OrderId = order.OrderId,
UnitPrice = album.Price,
Quantity = item.Count,
};
// Set the order total of the shopping cart
orderTotal += (item.Count * item.Album.Price);
_db.OrderDetails.Add(orderDetail);
}
// 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(HttpContextBase context)
{
if (context.Session[CartSessionKey] == null)
{
if (!string.IsNullOrWhiteSpace(context.User.Identity.Name))
{
context.Session[CartSessionKey] = context.User.Identity.Name;
}
else
{
// Generate a new random GUID using System.Guid class
Guid tempCartId = Guid.NewGuid();
// Send tempCartId back to client as a cookie
context.Session[CartSessionKey] = tempCartId.ToString();
}
}
return context.Session[CartSessionKey].ToString();
}
// When a user has logged in, migrate their shopping cart to
// be associated with their username
public void MigrateCart(string userName)
{
var shoppingCart = _db.Carts.Where(c => c.CartId == ShoppingCartId);
foreach (Cart item in shoppingCart)
{
item.CartId = userName;
}
}
}
}

View File

@ -0,0 +1,299 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{25CE8290-EF24-4818-B009-68DC903163D3}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MvcMusicStore</RootNamespace>
<AssemblyName>MvcMusicStore</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<WebGreaseLibPath>..\..\packages\WebGrease.1.5.2\lib</WebGreaseLibPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Antlr3.Runtime, Version=3.4.1.9004, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\EntityFramework.6.0.2\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\EntityFramework.6.0.2\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core">
<HintPath>..\..\packages\Microsoft.AspNet.Identity.Core.1.0.0\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.EntityFramework">
<HintPath>..\..\packages\Microsoft.AspNet.Identity.EntityFramework.1.0.0\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Owin">
<HintPath>..\..\packages\Microsoft.AspNet.Identity.Owin.1.0.0\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Owin">
<HintPath>..\..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Host.SystemWeb">
<HintPath>..\..\packages\Microsoft.Owin.Host.SystemWeb.2.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security">
<HintPath>..\..\packages\Microsoft.Owin.Security.2.0.2\lib\net45\Microsoft.Owin.Security.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Cookies">
<HintPath>..\..\packages\Microsoft.Owin.Security.Cookies.2.0.2\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Facebook">
<HintPath>..\..\packages\Microsoft.Owin.Security.Facebook.2.0.0\lib\net45\Microsoft.Owin.Security.Facebook.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Google">
<HintPath>..\..\packages\Microsoft.Owin.Security.Google.2.0.0\lib\net45\Microsoft.Owin.Security.Google.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.MicrosoftAccount">
<HintPath>..\..\packages\Microsoft.Owin.Security.MicrosoftAccount.2.0.0\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.OAuth">
<HintPath>..\..\packages\Microsoft.Owin.Security.OAuth.2.0.2\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Twitter">
<HintPath>..\..\packages\Microsoft.Owin.Security.Twitter.2.0.0\lib\net45\Microsoft.Owin.Security.Twitter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Owin">
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization">
<HintPath>..\..\packages\Microsoft.AspNet.Web.Optimization.1.1.1\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Net.Http">
</Reference>
<Reference Include="System.Net.Http.WebRequest">
</Reference>
<Reference Include="WebGrease">
<HintPath>..\..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="App_Start\Startup.App.cs" />
<Compile Include="App_Start\Startup.Auth.cs" />
<Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\CheckoutController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\ShoppingCartController.cs" />
<Compile Include="Controllers\StoreController.cs" />
<Compile Include="Controllers\StoreManagerController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Models\AccountViewModels.cs" />
<Compile Include="Models\Album.cs" />
<Compile Include="Models\Artist.cs" />
<Compile Include="Models\Cart.cs" />
<Compile Include="Models\Genre.cs" />
<Compile Include="Models\IdentityModels.cs" />
<Compile Include="Models\MusicStoreEntities.cs" />
<Compile Include="Models\Order.cs" />
<Compile Include="Models\OrderDetail.cs" />
<Compile Include="Models\SampleData.cs" />
<Compile Include="Models\ShoppingCart.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Startup.cs" />
<Compile Include="ViewModels\ShoppingCartRemoveViewModel.cs" />
<Compile Include="ViewModels\ShoppingCartViewModel.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\bootstrap-theme.css" />
<Content Include="Content\bootstrap-theme.min.css" />
<Content Include="Content\bootstrap.css" />
<Content Include="Content\bootstrap.min.css" />
<Content Include="favicon.ico" />
<Content Include="fonts\glyphicons-halflings-regular.svg" />
<Content Include="Global.asax" />
<Content Include="Content\Site.css" />
<Content Include="Images\home-showcase.png" />
<Content Include="Images\logo.png" />
<Content Include="Images\logo.svg" />
<Content Include="Images\placeholder.png" />
<Content Include="Images\placeholder.svg" />
<Content Include="Scripts\bootstrap.js" />
<Content Include="Scripts\bootstrap.min.js" />
<Content Include="fonts\glyphicons-halflings-regular.woff" />
<Content Include="fonts\glyphicons-halflings-regular.ttf" />
<Content Include="fonts\glyphicons-halflings-regular.eot" />
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
<None Include="Scripts\jquery-1.9.1.intellisense.js" />
<Content Include="Scripts\jquery-1.9.1.js" />
<Content Include="Scripts\jquery-1.9.1.min.js" />
<Content Include="Scripts\jquery-1.9.1.min.map" />
<None Include="Scripts\jquery.validate-vsdoc.js" />
<Content Include="Scripts\jquery.validate.js" />
<Content Include="Scripts\jquery.validate.min.js" />
<Content Include="Scripts\jquery.validate.unobtrusive.js" />
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
<Content Include="Scripts\modernizr-2.6.2.js" />
<Content Include="Scripts\respond.js" />
<Content Include="Scripts\respond.min.js" />
<Content Include="Scripts\_references.js" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
<Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Views\Web.config" />
<Content Include="Views\_ViewStart.cshtml" />
<Content Include="Views\Shared\Error.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" />
<Content Include="Views\Home\About.cshtml" />
<Content Include="Views\Home\Contact.cshtml" />
<Content Include="Views\Home\Index.cshtml" />
<Content Include="Views\Account\_ChangePasswordPartial.cshtml" />
<Content Include="Views\Account\_ExternalLoginsListPartial.cshtml" />
<Content Include="Views\Account\_RemoveAccountPartial.cshtml" />
<Content Include="Views\Account\_SetPasswordPartial.cshtml" />
<Content Include="Views\Account\ExternalLoginConfirmation.cshtml" />
<Content Include="Views\Account\ExternalLoginFailure.cshtml" />
<Content Include="Views\Account\Login.cshtml" />
<Content Include="Views\Account\Manage.cshtml" />
<Content Include="Views\Account\Register.cshtml" />
<Content Include="Views\Shared\_LoginPartial.cshtml" />
<Content Include="Views\Store\Index.cshtml" />
<Content Include="Views\Store\Details.cshtml" />
<Content Include="Views\Store\Browse.cshtml" />
<Content Include="Views\StoreManager\Create.cshtml" />
<Content Include="Views\StoreManager\Delete.cshtml" />
<Content Include="Views\StoreManager\Details.cshtml" />
<Content Include="Views\StoreManager\Edit.cshtml" />
<Content Include="Views\StoreManager\Index.cshtml" />
<Content Include="Views\ShoppingCart\CartSummary.cshtml" />
<Content Include="Views\ShoppingCart\Index.cshtml" />
<Content Include="Views\Checkout\AddressAndPayment.cshtml" />
<Content Include="Views\Checkout\Complete.cshtml" />
<Content Include="Views\Store\GenreMenu.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>43524</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:43524/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target> -->
</Project>

View File

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MvcMusicStore")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MvcMusicStore")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("64547e1b-3030-4458-ab71-a970f2916ed6")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Binary file not shown.

1999
src/MvcMusicStore/Scripts/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

9597
src/MvcMusicStore/Scripts/jquery-1.9.1.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
/**
* jQuery Validation Plugin 1.8.1
*
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/Plugins/Validation
*
* Copyright (c) 2006 - 2011 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("<input type='hidden'/>").attr("name",
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name];
return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a,
b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},
onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,
a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),
minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator");e="on"+e.type.replace(/^validate/,
"");f.settings[e]&&f.settings[e].call(f,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=this.settings.rules;
c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",a).validateDelegate(":radio, :checkbox, select, option","click",a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",
[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,
a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},
objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==
a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,
this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=
c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=
this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a]},defaultMessage:function(a,b){return this.findDefined(this.customMessage(a.name,b),this.customMetaMessage(a,b),!this.settings.ignoreTitle&&a.title||undefined,c.validator.messages[b],"<strong>Warning: No message defined for "+
a.name+"</strong>")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];
this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);
this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||
"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},
idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},
depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<
0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},
email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b=
{};a=c(a);for(var d in c.validator.methods){var e=a.attr(d);if(e)b[d]=e}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===
false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&
a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},
methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=
e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=
e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||
a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)},
url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>=
0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery);
(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery);
(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a,
b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery);

View File

@ -0,0 +1,344 @@
/* NUGET: BEGIN LICENSE TEXT
*
* Microsoft grants you the right to use these script files for the sole
* purpose of either: (i) interacting through your browser with the Microsoft
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft product subject
* to that product's license terms. Microsoft reserves all other rights to the
* files not expressly granted by Microsoft, whether by implication, estoppel
* or otherwise. Insofar as a script file is dual licensed under GPL,
* Microsoft neither took the code under GPL nor distributes it thereunder but
* under the terms set out in this paragraph. All notices and licenses
* below are for informational purposes only.
*
* NUGET: END LICENSE TEXT */
/*!
** Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.
*/
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
/*global document: false, jQuery: false */
(function ($) {
var $jQval = $.validator,
adapters,
data_validation = "unobtrusiveValidation";
function setValidationValues(options, ruleName, value) {
options.rules[ruleName] = value;
if (options.message) {
options.messages[ruleName] = options.message;
}
}
function splitAndTrim(value) {
return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
}
function escapeAttributeValue(value) {
// As mentioned on http://api.jquery.com/category/selectors/
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
}
function getModelPrefix(fieldName) {
return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
}
function appendModelPrefix(value, prefix) {
if (value.indexOf("*.") === 0) {
value = value.replace("*.", prefix);
}
return value;
}
function onError(error, inputElement) { // 'this' is the form element
var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"),
replaceAttrValue = container.attr("data-valmsg-replace"),
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;
container.removeClass("field-validation-valid").addClass("field-validation-error");
error.data("unobtrusiveContainer", container);
if (replace) {
container.empty();
error.removeClass("input-validation-error").appendTo(container);
}
else {
error.hide();
}
}
function onErrors(event, validator) { // 'this' is the form element
var container = $(this).find("[data-valmsg-summary=true]"),
list = container.find("ul");
if (list && list.length && validator.errorList.length) {
list.empty();
container.addClass("validation-summary-errors").removeClass("validation-summary-valid");
$.each(validator.errorList, function () {
$("<li />").html(this.message).appendTo(list);
});
}
}
function onSuccess(error) { // 'this' is the form element
var container = error.data("unobtrusiveContainer"),
replaceAttrValue = container.attr("data-valmsg-replace"),
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
if (container) {
container.addClass("field-validation-valid").removeClass("field-validation-error");
error.removeData("unobtrusiveContainer");
if (replace) {
container.empty();
}
}
}
function onReset(event) { // 'this' is the form element
var $form = $(this);
$form.data("validator").resetForm();
$form.find(".validation-summary-errors")
.addClass("validation-summary-valid")
.removeClass("validation-summary-errors");
$form.find(".field-validation-error")
.addClass("field-validation-valid")
.removeClass("field-validation-error")
.removeData("unobtrusiveContainer")
.find(">*") // If we were using valmsg-replace, get the underlying error
.removeData("unobtrusiveContainer");
}
function validationInfo(form) {
var $form = $(form),
result = $form.data(data_validation),
onResetProxy = $.proxy(onReset, form);
if (!result) {
result = {
options: { // options structure passed to jQuery Validate's validate() method
errorClass: "input-validation-error",
errorElement: "span",
errorPlacement: $.proxy(onError, form),
invalidHandler: $.proxy(onErrors, form),
messages: {},
rules: {},
success: $.proxy(onSuccess, form)
},
attachValidation: function () {
$form
.unbind("reset." + data_validation, onResetProxy)
.bind("reset." + data_validation, onResetProxy)
.validate(this.options);
},
validate: function () { // a validation function that is called by unobtrusive Ajax
$form.validate();
return $form.valid();
}
};
$form.data(data_validation, result);
}
return result;
}
$jQval.unobtrusive = {
adapters: [],
parseElement: function (element, skipAttach) {
/// <summary>
/// Parses a single HTML element for unobtrusive validation attributes.
/// </summary>
/// <param name="element" domElement="true">The HTML element to be parsed.</param>
/// <param name="skipAttach" type="Boolean">[Optional] true to skip attaching the
/// validation to the form. If parsing just this single element, you should specify true.
/// If parsing several elements, you should specify false, and manually attach the validation
/// to the form when you are finished. The default is false.</param>
var $element = $(element),
form = $element.parents("form")[0],
valInfo, rules, messages;
if (!form) { // Cannot do client-side validation without a form
return;
}
valInfo = validationInfo(form);
valInfo.options.rules[element.name] = rules = {};
valInfo.options.messages[element.name] = messages = {};
$.each(this.adapters, function () {
var prefix = "data-val-" + this.name,
message = $element.attr(prefix),
paramValues = {};
if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
prefix += "-";
$.each(this.params, function () {
paramValues[this] = $element.attr(prefix + this);
});
this.adapt({
element: element,
form: form,
message: message,
params: paramValues,
rules: rules,
messages: messages
});
}
});
$.extend(rules, { "__dummy__": true });
if (!skipAttach) {
valInfo.attachValidation();
}
},
parse: function (selector) {
/// <summary>
/// Parses all the HTML elements in the specified selector. It looks for input elements decorated
/// with the [data-val=true] attribute value and enables validation according to the data-val-*
/// attribute values.
/// </summary>
/// <param name="selector" type="String">Any valid jQuery selector.</param>
var $forms = $(selector)
.parents("form")
.andSelf()
.add($(selector).find("form"))
.filter("form");
// :input is a psuedoselector provided by jQuery which selects input and input-like elements
// combining :input with other selectors significantly decreases performance.
$(selector).find(":input").filter("[data-val=true]").each(function () {
$jQval.unobtrusive.parseElement(this, true);
});
$forms.each(function () {
var info = validationInfo(this);
if (info) {
info.attachValidation();
}
});
}
};
adapters = $jQval.unobtrusive.adapters;
adapters.add = function (adapterName, params, fn) {
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
/// <param name="params" type="Array" optional="true">[Optional] An array of parameter names (strings) that will
/// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and
/// mmmm is the parameter name).</param>
/// <param name="fn" type="Function">The function to call, which adapts the values from the HTML
/// attributes into jQuery Validate rules and/or messages.</param>
/// <returns type="jQuery.validator.unobtrusive.adapters" />
if (!fn) { // Called with no params, just a function
fn = params;
params = [];
}
this.push({ name: adapterName, params: params, adapt: fn });
return this;
};
adapters.addBool = function (adapterName, ruleName) {
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
/// the jQuery Validate validation rule has no parameter values.</summary>
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
/// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value
/// of adapterName will be used instead.</param>
/// <returns type="jQuery.validator.unobtrusive.adapters" />
return this.add(adapterName, function (options) {
setValidationValues(options, ruleName || adapterName, true);
});
};
adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
/// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and
/// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
/// <param name="minRuleName" type="String">The name of the jQuery Validate rule to be used when you only
/// have a minimum value.</param>
/// <param name="maxRuleName" type="String">The name of the jQuery Validate rule to be used when you only
/// have a maximum value.</param>
/// <param name="minMaxRuleName" type="String">The name of the jQuery Validate rule to be used when you
/// have both a minimum and maximum value.</param>
/// <param name="minAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that
/// contains the minimum value. The default is "min".</param>
/// <param name="maxAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that
/// contains the maximum value. The default is "max".</param>
/// <returns type="jQuery.validator.unobtrusive.adapters" />
return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
var min = options.params.min,
max = options.params.max;
if (min && max) {
setValidationValues(options, minMaxRuleName, [min, max]);
}
else if (min) {
setValidationValues(options, minRuleName, min);
}
else if (max) {
setValidationValues(options, maxRuleName, max);
}
});
};
adapters.addSingleVal = function (adapterName, attribute, ruleName) {
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
/// the jQuery Validate validation rule has a single value.</summary>
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
/// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>
/// <param name="attribute" type="String">[Optional] The name of the HTML attribute that contains the value.
/// The default is "val".</param>
/// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value
/// of adapterName will be used instead.</param>
/// <returns type="jQuery.validator.unobtrusive.adapters" />
return this.add(adapterName, [attribute || "val"], function (options) {
setValidationValues(options, ruleName || adapterName, options.params[attribute]);
});
};
$jQval.addMethod("__dummy__", function (value, element, params) {
return true;
});
$jQval.addMethod("regex", function (value, element, params) {
var match;
if (this.optional(element)) {
return true;
}
match = new RegExp(params).exec(value);
return (match && (match.index === 0) && (match[0].length === value.length));
});
$jQval.addMethod("nonalphamin", function (value, element, nonalphamin) {
var match;
if (nonalphamin) {
match = value.match(/\W/g);
match = match && match.length >= nonalphamin;
}
return match;
});
if ($jQval.methods.extension) {
adapters.addSingleVal("accept", "mimtype");
adapters.addSingleVal("extension", "extension");
} else {
// for backward compatibility, when the 'extension' validation method does not exist, such as with versions
// of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for
// validating the extension, and ignore mime-type validations as they are not supported.
adapters.addSingleVal("extension", "extension", "accept");
}
adapters.addSingleVal("regex", "pattern");
adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");
adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range");
adapters.add("equalto", ["other"], function (options) {
var prefix = getModelPrefix(options.element.name),
other = options.params.other,
fullOtherName = appendModelPrefix(other, prefix),
element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0];
setValidationValues(options, "equalTo", element);
});
adapters.add("required", function (options) {
// jQuery Validate equates "required" with "mandatory" for checkbox elements
if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") {
setValidationValues(options, "required", true);
}
});
adapters.add("remote", ["url", "type", "additionalfields"], function (options) {
var value = {
url: options.params.url,
type: options.params.type || "GET",
data: {}
},
prefix = getModelPrefix(options.element.name);
$.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
var paramName = appendModelPrefix(fieldName, prefix);
value.data[paramName] = function () {
return $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']").val();
};
});
setValidationValues(options, "remote", value);
});
adapters.add("password", ["min", "nonalphamin", "regex"], function (options) {
if (options.params.min) {
setValidationValues(options, "minlength", options.params.min);
}
if (options.params.nonalphamin) {
setValidationValues(options, "nonalphamin", options.params.nonalphamin);
}
if (options.params.regex) {
setValidationValues(options, "regex", options.params.regex);
}
});
$(function () {
$jQval.unobtrusive.parse(document);
});
}(jQuery));

View File

@ -0,0 +1,19 @@
/* NUGET: BEGIN LICENSE TEXT
*
* Microsoft grants you the right to use these script files for the sole
* purpose of either: (i) interacting through your browser with the Microsoft
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft product subject
* to that product's license terms. Microsoft reserves all other rights to the
* files not expressly granted by Microsoft, whether by implication, estoppel
* or otherwise. Insofar as a script file is dual licensed under GPL,
* Microsoft neither took the code under GPL nor distributes it thereunder but
* under the terms set out in this paragraph. All notices and licenses
* below are for informational purposes only.
*
* NUGET: END LICENSE TEXT */
/*
** Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.
*/
(function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("<li />").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this);b.data("validator").resetForm();b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(c){var b=a(c),d=b.data(e),f=a.proxy(n,c);if(!d){d={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:a.proxy(m,c),invalidHandler:a.proxy(l,c),messages:{},rules:{},success:a.proxy(k,c)},attachValidation:function(){b.unbind("reset."+e,f).bind("reset."+e,f).validate(this.options)},validate:function(){b.validate();return b.valid()}};b.data(e,d)}return d}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(b){var c=a(b).parents("form").andSelf().add(a(b).find("form")).filter("form");a(b).find(":input").filter("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});c.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){return a(b.form).find(":input").filter("[name='"+f(c)+"']").val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,326 @@
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
window.matchMedia = window.matchMedia || (function(doc, undefined){
var bool,
docElem = doc.documentElement,
refNode = docElem.firstElementChild || docElem.firstChild,
// fakeBody required for <FF4 when executed in <head>
fakeBody = doc.createElement('body'),
div = doc.createElement('div');
div.id = 'mq-test-1';
div.style.cssText = "position:absolute;top:-100em";
fakeBody.style.background = "none";
fakeBody.appendChild(div);
return function(q){
div.innerHTML = '&shy;<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>';
docElem.insertBefore(fakeBody, refNode);
bool = div.offsetWidth == 42;
docElem.removeChild(fakeBody);
return { matches: bool, media: q };
};
})(document);
/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function( win ){
//exposed namespace
win.respond = {};
//define update even in native-mq-supporting browsers, to avoid errors
respond.update = function(){};
//expose media query support flag for external use
respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches;
//if media queries are supported, exit here
if( respond.mediaQueriesSupported ){ return; }
//define vars
var doc = win.document,
docElem = doc.documentElement,
mediastyles = [],
rules = [],
appendedEls = [],
parsedSheets = {},
resizeThrottle = 30,
head = doc.getElementsByTagName( "head" )[0] || docElem,
base = doc.getElementsByTagName( "base" )[0],
links = head.getElementsByTagName( "link" ),
requestQueue = [],
//loop stylesheets, send text content to translate
ripCSS = function(){
var sheets = links,
sl = sheets.length,
i = 0,
//vars for loop:
sheet, href, media, isCSS;
for( ; i < sl; i++ ){
sheet = sheets[ i ],
href = sheet.href,
media = sheet.media,
isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
//only links plz and prevent re-parsing
if( !!href && isCSS && !parsedSheets[ href ] ){
// selectivizr exposes css through the rawCssText expando
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
translate( sheet.styleSheet.rawCssText, href, media );
parsedSheets[ href ] = true;
} else {
if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base)
|| href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){
requestQueue.push( {
href: href,
media: media
} );
}
}
}
}
makeRequests();
},
//recurse through request queue, get css text
makeRequests = function(){
if( requestQueue.length ){
var thisRequest = requestQueue.shift();
ajax( thisRequest.href, function( styles ){
translate( styles, thisRequest.href, thisRequest.media );
parsedSheets[ thisRequest.href ] = true;
makeRequests();
} );
}
},
//find media blocks in css text, convert to style blocks
translate = function( styles, href, media ){
var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ),
ql = qs && qs.length || 0,
//try to get CSS path
href = href.substring( 0, href.lastIndexOf( "/" )),
repUrls = function( css ){
return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" );
},
useMedia = !ql && media,
//vars used in loop
i = 0,
j, fullq, thisq, eachq, eql;
//if path exists, tack on trailing slash
if( href.length ){ href += "/"; }
//if no internal queries exist, but media attr does, use that
//note: this currently lacks support for situations where a media attr is specified on a link AND
//its associated stylesheet has internal CSS media queries.
//In those cases, the media attribute will currently be ignored.
if( useMedia ){
ql = 1;
}
for( ; i < ql; i++ ){
j = 0;
//media attr
if( useMedia ){
fullq = media;
rules.push( repUrls( styles ) );
}
//parse for styles
else{
fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1;
rules.push( RegExp.$2 && repUrls( RegExp.$2 ) );
}
eachq = fullq.split( "," );
eql = eachq.length;
for( ; j < eql; j++ ){
thisq = eachq[ j ];
mediastyles.push( {
media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all",
rules : rules.length - 1,
hasquery: thisq.indexOf("(") > -1,
minw : thisq.match( /\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ),
maxw : thisq.match( /\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" )
} );
}
}
applyMedia();
},
lastCall,
resizeDefer,
// returns the value of 1em in pixels
getEmValue = function() {
var ret,
div = doc.createElement('div'),
body = doc.body,
fakeUsed = false;
div.style.cssText = "position:absolute;font-size:1em;width:1em";
if( !body ){
body = fakeUsed = doc.createElement( "body" );
body.style.background = "none";
}
body.appendChild( div );
docElem.insertBefore( body, docElem.firstChild );
ret = div.offsetWidth;
if( fakeUsed ){
docElem.removeChild( body );
}
else {
body.removeChild( div );
}
//also update eminpx before returning
ret = eminpx = parseFloat(ret);
return ret;
},
//cached container for 1em value, populated the first time it's needed
eminpx,
//enable/disable styles
applyMedia = function( fromResize ){
var name = "clientWidth",
docElemProp = docElem[ name ],
currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
styleBlocks = {},
lastLink = links[ links.length-1 ],
now = (new Date()).getTime();
//throttle resize calls
if( fromResize && lastCall && now - lastCall < resizeThrottle ){
clearTimeout( resizeDefer );
resizeDefer = setTimeout( applyMedia, resizeThrottle );
return;
}
else {
lastCall = now;
}
for( var i in mediastyles ){
var thisstyle = mediastyles[ i ],
min = thisstyle.minw,
max = thisstyle.maxw,
minnull = min === null,
maxnull = max === null,
em = "em";
if( !!min ){
min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
}
if( !!max ){
max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
}
// if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true
if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){
if( !styleBlocks[ thisstyle.media ] ){
styleBlocks[ thisstyle.media ] = [];
}
styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );
}
}
//remove any existing respond style element(s)
for( var i in appendedEls ){
if( appendedEls[ i ] && appendedEls[ i ].parentNode === head ){
head.removeChild( appendedEls[ i ] );
}
}
//inject active styles, grouped by media type
for( var i in styleBlocks ){
var ss = doc.createElement( "style" ),
css = styleBlocks[ i ].join( "\n" );
ss.type = "text/css";
ss.media = i;
//originally, ss was appended to a documentFragment and sheets were appended in bulk.
//this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!
head.insertBefore( ss, lastLink.nextSibling );
if ( ss.styleSheet ){
ss.styleSheet.cssText = css;
}
else {
ss.appendChild( doc.createTextNode( css ) );
}
//push to appendedEls to track for later removal
appendedEls.push( ss );
}
},
//tweaked Ajax functions from Quirksmode
ajax = function( url, callback ) {
var req = xmlHttp();
if (!req){
return;
}
req.open( "GET", url, true );
req.onreadystatechange = function () {
if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){
return;
}
callback( req.responseText );
}
if ( req.readyState == 4 ){
return;
}
req.send( null );
},
//define ajax obj
xmlHttp = (function() {
var xmlhttpmethod = false;
try {
xmlhttpmethod = new XMLHttpRequest();
}
catch( e ){
xmlhttpmethod = new ActiveXObject( "Microsoft.XMLHTTP" );
}
return function(){
return xmlhttpmethod;
};
})();
//translate CSS
ripCSS();
//expose update for re-running respond later on
respond.update = ripCSS;
//adjust on resize
function callMedia(){
applyMedia( true );
}
if( win.addEventListener ){
win.addEventListener( "resize", callMedia, false );
}
else if( win.attachEvent ){
win.attachEvent( "onresize", callMedia );
}
})(this);

View File

@ -0,0 +1,6 @@
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='&shy;<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);
/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);

View File

@ -0,0 +1,16 @@
using Microsoft.Owin;
using Owin;
[assembly: OwinStartupAttribute(typeof(MvcMusicStore.Startup))]
namespace MvcMusicStore
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
ConfigureApp(app);
}
}
}

View File

@ -0,0 +1,11 @@
namespace MvcMusicStore.ViewModels
{
public class ShoppingCartRemoveViewModel
{
public string Message { get; set; }
public decimal CartTotal { get; set; }
public int CartCount { get; set; }
public int ItemCount { get; set; }
public int DeleteId { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using System.Collections.Generic;
using MvcMusicStore.Models;
namespace MvcMusicStore.ViewModels
{
public class ShoppingCartViewModel
{
public List<Cart> CartItems { get; set; }
public decimal CartTotal { get; set; }
}
}

View File

@ -0,0 +1,36 @@
@model MvcMusicStore.Models.ExternalLoginConfirmationViewModel
@{
ViewBag.Title = "Register";
}
<h2>@ViewBag.Title.</h2>
<h3>Associate your @ViewBag.LoginProvider account.</h3>
@using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()
<h4>Association Form</h4>
<hr />
@Html.ValidationSummary(true)
<p class="text-info">
You've successfully authenticated with <strong>@ViewBag.LoginProvider</strong>.
Please enter a user name for this site below and click the Register button to finish
logging in.
</p>
<div class="form-group">
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
@Html.ValidationMessageFor(m => m.UserName)
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-default" value="Register" />
</div>
</div>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}

View File

@ -0,0 +1,6 @@
@{
ViewBag.Title = "Login Failure";
}
<h2>@ViewBag.Title.</h2>
<h3 class="text-error">Unsuccessful login with service.</h3>

View File

@ -0,0 +1,58 @@
@model MvcMusicStore.Models.LoginViewModel
@{
ViewBag.Title = "Log in";
}
<h2>@ViewBag.Title.</h2>
<div class="row">
<div class="col-md-8">
<section id="loginForm">
@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()
<h4>Use a local account to log in.</h4>
<hr />
@Html.ValidationSummary(true)
<div class="form-group">
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
@Html.ValidationMessageFor(m => m.UserName)
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.Password, new { @class = "form-control" })
@Html.ValidationMessageFor(m => m.Password)
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
@Html.CheckBoxFor(m => m.RememberMe)
@Html.LabelFor(m => m.RememberMe)
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Log in" class="btn btn-default" />
</div>
</div>
<p>
@Html.ActionLink("Register", "Register") if you don't have a local account.
</p>
}
</section>
</div>
<div class="col-md-4">
<section id="socialLoginForm">
@Html.Partial("_ExternalLoginsListPartial", new { Action = "ExternalLogin", ReturnUrl = ViewBag.ReturnUrl })
</section>
</div>
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}

View File

@ -0,0 +1,29 @@
@using MvcMusicStore.Models;
@using Microsoft.AspNet.Identity;
@{
ViewBag.Title = "Manage Account";
}
<h2>@ViewBag.Title.</h2>
<p class="text-success">@ViewBag.StatusMessage</p>
<div class="row">
<div class="col-md-12">
@if (ViewBag.HasLocalPassword)
{
@Html.Partial("_ChangePasswordPartial")
}
else
{
@Html.Partial("_SetPasswordPartial")
}
<section id="externalLogins">
@Html.Action("RemoveAccountList")
@Html.Partial("_ExternalLoginsListPartial", new { Action = "LinkLogin", ReturnUrl = ViewBag.ReturnUrl })
</section>
</div>
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}

View File

@ -0,0 +1,41 @@
@model MvcMusicStore.Models.RegisterViewModel
@{
ViewBag.Title = "Register";
}
<h2>@ViewBag.Title.</h2>
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()
<h4>Create a new account.</h4>
<hr />
@Html.ValidationSummary()
<div class="form-group">
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.Password, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-default" value="Register" />
</div>
</div>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}

View File

@ -0,0 +1,36 @@
@using Microsoft.AspNet.Identity
@model MvcMusicStore.Models.ManageUserViewModel
<p>You're logged in as <strong>@User.Identity.GetUserName()</strong>.</p>
@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()
<h4>Change Password Form</h4>
<hr />
@Html.ValidationSummary()
<div class="form-group">
@Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Change password" class="btn btn-default" />
</div>
</div>
}

View File

@ -0,0 +1,31 @@
@using Microsoft.Owin.Security
<h4>Use another service to log in.</h4>
<hr />
@{
var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
if (loginProviders.Count() == 0)
{
<div>
<p>There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=313242">this article</a>
for details on setting up this ASP.NET application to support logging in via external services.</p>
</div>
}
else
{
string action = Model.Action;
string returnUrl = Model.ReturnUrl;
using (Html.BeginForm(action, "Account", new { ReturnUrl = returnUrl }))
{
@Html.AntiForgeryToken()
<div id="socialLoginList">
<p>
@foreach (AuthenticationDescription p in loginProviders)
{
<button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
}
</p>
</div>
}
}
}

View File

@ -0,0 +1,34 @@
@model ICollection<Microsoft.AspNet.Identity.UserLoginInfo>
@if (Model.Count > 0)
{
<h4>Registered Logins</h4>
<table class="table">
<tbody>
@foreach (var account in Model)
{
<tr>
<td>@account.LoginProvider</td>
<td>
@if (ViewBag.ShowRemoveButton)
{
using (Html.BeginForm("Disassociate", "Account"))
{
@Html.AntiForgeryToken()
<div>
@Html.Hidden("loginProvider", account.LoginProvider)
@Html.Hidden("providerKey", account.ProviderKey)
<input type="submit" class="btn btn-default" value="Remove" title="Remove this @account.LoginProvider login from your account" />
</div>
}
}
else
{
@: &nbsp;
}
</td>
</tr>
}
</tbody>
</table>
}

View File

@ -0,0 +1,32 @@
@model MvcMusicStore.Models.ManageUserViewModel
<p class="text-info">
You do not have a local username/password for this site. Add a local
account so you can log in without an external login.
</p>
@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()
<h4>Create Local Login</h4>
<hr />
@Html.ValidationSummary()
<div class="form-group">
@Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Set password" class="btn btn-default" />
</div>
</div>
}

View File

@ -0,0 +1,32 @@
@model MvcMusicStore.Models.Order
@{
ViewBag.Title = "Address And Payment";
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
@using (Html.BeginForm()) {
<h2>Address And Payment</h2>
<fieldset>
<legend>Shipping Information</legend>
@Html.EditorForModel()
</fieldset>
<fieldset>
<legend>Payment</legend>
<p>We're running a promotion: all music is free with the promo code: "FREE"</p>
<div class="editor-label">
@Html.Label("Promo Code")
</div>
<div class="editor-field">
@Html.TextBox("PromoCode")
</div>
</fieldset>
<input type="submit" value="Submit Order" />
}

View File

@ -0,0 +1,13 @@
@model int
@{
ViewBag.Title = "Checkout Complete";
}
<h2>Checkout Complete</h2>
<p>Thanks for your order! Your order number is: @Model</p>
<p>How about shopping for some more music in our
@Html.ActionLink("Store", "Index", "Home")
</p>

View File

@ -0,0 +1,7 @@
@{
ViewBag.Title = "About";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<p>Use this area to provide additional information.</p>

View File

@ -0,0 +1,17 @@
@{
ViewBag.Title = "Contact";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
</address>

View File

@ -0,0 +1,20 @@
@{
ViewBag.Title = "Home Page";
}
<div class="jumbotron">
<h1>MVC Music Store</h1>
<img src="~/Images/home-showcase.png" />
</div>
<ul class="row list-unstyled" id="album-list">
@foreach (var album in Model)
{
<li class="col-lg-2 col-md-2 col-sm-2 col-xs-4 container">
<a href="@Url.Action("Details", "Store", new { id = album.AlbumId })">
<img alt="@album.Title" src="@Url.Content( @album.AlbumArtUrl)" />
<h4>@album.Title</h4>
</a>
</li>
}
</ul>

View File

@ -0,0 +1,9 @@
@model System.Web.Mvc.HandleErrorInfo
@{
ViewBag.Title = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title MVC Music Store</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("ASP.NET MVC Music Store", "Index", "Home", null, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
@Html.Action("GenreMenu", "Store")
@Html.Action("CartSummary", "ShoppingCart")
</ul>
@Html.Partial("_LoginPartial")
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<hr />
<footer class="navbar navbar-fixed-bottom navbar-default text-center">
<p><a href="http://mvcmusicstore.codeplex.com">mvcmusicstore.codeplex.com</a></p>
<small>@Html.ActionLink("admin", "Index", "StoreManager")</small>
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</body>
</html>

View File

@ -0,0 +1,22 @@
@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated)
{
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
{
@Html.AntiForgeryToken()
<ul class="nav navbar-nav navbar-right">
<li>
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" })
</li>
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
</ul>
}
}
else
{
<ul class="nav navbar-nav navbar-right">
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
</ul>
}

Some files were not shown because too many files have changed in this diff Show More