Skip to content
Browse files

Merge remote-tracking branch 'origin/master'

  • Loading branch information...
2 parents 66432f6 + 9239429 commit a24772eb22513eb6088077a586ee985be862cb56 @mrchief mrchief committed
View
126 Core/DataAccess/DataContext.DemoDataInitializer.cs
@@ -9,6 +9,8 @@ public partial class DataContext
{
public class DemoDataInitializer : Initializer
{
+ readonly Random rand = new Random();
+
public DemoDataInitializer(IDatabaseInitializer<DataContext> initializer)
: base(initializer)
{
@@ -18,148 +20,106 @@ protected override void Seed(DataContext context)
{
base.Seed(context);
- var frankSinatra = new User()
- {
+ context.Users.Add(new User {
Username = "Frank Sinatra",
EmailAddress = "frank@theratpack.com",
- };
- context.Users.Add(frankSinatra);
+ });
- var freddieMercury = new User()
- {
+ context.Users.Add(new User {
Username = "Freddie Mercury",
EmailAddress = "freddie@queenband.com",
- };
- context.Users.Add(freddieMercury);
+ });
- var johnLennon = new User()
- {
+ context.Users.Add(new User {
Username = "John Lennon",
EmailAddress = "lenny@thebeatles.com",
- };
- context.Users.Add(johnLennon);
+ });
var videoGameSystems = context.Categories.Local.Single(x => x.Name == "Video Game Systems");
- var sports = context.Categories.Local.Single(x => x.Name == "Sporting Goods");
- var collectibles = context.Categories.Local.Single(x => x.Name == "Collectibles");
-
- context.Products.Add(new Product
+ context.Auctions.Add(new Auction
{
Categories = new[] { videoGameSystems },
- Name = "Xbox 360 Elite",
+ Title = "Xbox 360 Elite",
Description = "The Xbox 360 Elite gaming system is the ultimate in gaming",
Images = new WebsiteImage[] { "~/Content/images/products/xbox360elite.jpg" },
- Reviews = new[] {
- new Review { User = frankSinatra, Description = "It's really awesome!", Rating = 4.5 },
- new Review { User = johnLennon, Description = "It's quite horrible", Rating = 2 },
- new Review { User = freddieMercury, Description = "I love mine so much I want another!", Rating = 4 },
- }
});
- context.Products.Add(new Product
+ context.Auctions.Add(new Auction
{
Categories = new[] { videoGameSystems },
- Name = "Sony PSP Go",
+ Title = "Sony PSP Go",
Description = "The smallest and mightiest PSP system yet.",
Images = new WebsiteImage[] { "~/Content/images/products/psp.jpg" },
- Reviews = new[] {
- new Review { User = frankSinatra, Description = "It's really awesome!", Rating = 4.5 },
- new Review { User = johnLennon, Description = "It's quite horrible", Rating = 2 },
- }
});
- context.Products.Add(new Product
+ context.Auctions.Add(new Auction
{
Categories = new[] { videoGameSystems },
- Name = "Xbox 360 Kinect Sensor with Game Bundle",
+ Title = "Xbox 360 Kinect Sensor with Game Bundle",
Description = "You are the controller with Kinect for Xbox 360!",
Images = new WebsiteImage[] { "~/Content/images/products/kinect.jpg" },
- Reviews = new[] {
- new Review { User = frankSinatra, Description = "It's really awesome!", Rating = 4.5 },
- new Review { User = johnLennon, Description = "It's quite horrible", Rating = 2 },
- }
});
- context.Products.Add(new Product
+ context.Auctions.Add(new Auction
{
Categories = new[] { videoGameSystems },
- Name = "Sony Playstation 3 120GB Slim Console",
+ Title = "Sony Playstation 3 120GB Slim Console",
Description = "The fourth generation of hardware released for the PlayStation 3 entertainment platform, the PlayStation 3 120GB system is the next stage in the evolution of Sony's console gaming powerhouse.",
Images = new WebsiteImage[] { "~/Content/images/products/ps3.jpg" },
- Reviews = new[] {
- new Review { User = frankSinatra, Description = "It's really awesome!", Rating = 4.5 },
- new Review { User = johnLennon, Description = "It's quite horrible", Rating = 2 },
- }
});
- context.Products.Add(new Product
+ context.Auctions.Add(new Auction
{
Categories = new[] { videoGameSystems },
- Name = "Nintendo Wii Console Black",
+ Title = "Nintendo Wii Console Black",
Description = "Wii Sports Resort takes the inclusive, fun and intuitive controls of the original Wii Sports to the next level, introducing a whole new set of entertaining and physically immersive activities.",
Images = new WebsiteImage[] { "~/Content/images/products/wii.jpg" },
- Reviews = new[] {
- new Review { User = frankSinatra, Description = "It's really awesome!", Rating = 4.5 },
- new Review { User = johnLennon, Description = "It's quite horrible", Rating = 2 },
- }
});
- context.Products.Add(new Product
+
+
+ var sports = context.Categories.Local.Single(x => x.Name == "Sporting Goods");
+
+ context.Auctions.Add(new Auction
{
Categories = new Collection<Category> { sports },
- Name = "Burton Mayhem snow board",
+ Title = "Burton Mayhem snow board",
Description = "Burton Mayhem snow board: 159cm wide",
Images = new WebsiteImage[] { "~/Content/images/products/burtonMayhem.jpg" },
- Reviews = new[] {
- new Review { User = frankSinatra, Description = "It's really awesome!", Rating = 4.5 },
- new Review { User = johnLennon, Description = "It's quite horrible", Rating = 2 },
- }
});
- context.Products.Add(new Product
+
+
+ var collectibles = context.Categories.Local.Single(x => x.Name == "Collectibles");
+
+ context.Auctions.Add(new Auction
{
Categories = new Collection<Category> { collectibles },
- Name = "Lock of John Lennon's hair",
+ Title = "Lock of John Lennon's hair",
Description = "Lock of John Lennon's hair",
Images = new WebsiteImage[] { "~/Content/images/products/lockOfHair.jpg" },
- Reviews = new[] {
- new Review { User = frankSinatra, Description = "It's really awesome!", Rating = 4.5 },
- new Review { User = johnLennon, Description = "It's quite horrible", Rating = 2 },
- }
});
- var rand = new Random();
- var users = context.Users.Local.ToArray();
+
int featured = 0;
+ var users = context.Users.Local.ToArray();
- foreach (var product in context.Products.Local)
+ foreach (var auction in context.Auctions.Local)
{
- var startTime =
- DateTime.UtcNow
- .AddDays(rand.Next(-10, -1))
- .AddHours(rand.Next(1, 24))
- .AddHours(rand.Next(1, 60));
-
- var auction = new Auction()
- {
- Categories = product.Categories.ToArray(),
- Description = product.Description,
- EndTime = startTime.AddDays(rand.Next(3, 14)),
- Images = product.Images.ToArray(),
- Owner = users[rand.Next(users.Length)],
- Product = product,
- CurrentPrice = "$1",
- StartTime = startTime,
- Title = product.Name,
- };
-
- if (featured < 3)
- auction.FeatureAuction();
+ auction.StartTime = DateTime.UtcNow
+ .AddDays(rand.Next(-10, -1))
+ .AddHours(rand.Next(1, 24))
+ .AddHours(rand.Next(1, 60));
+
+ auction.EndTime = auction.StartTime.AddDays(rand.Next(3, 14));
+ auction.Owner = users[rand.Next(users.Length)];
+ auction.CurrentPrice = "$" + rand.Next(1, 100);
- context.Auctions.Add(auction);
+ if (featured++ < 3)
+ auction.FeatureAuction();
}
}
}
View
5 Core/DataAccess/DataContext.Initializer.cs
@@ -1,6 +1,4 @@
using System.Data.Entity;
-using System.Data.SqlClient;
-using System.Web.Management;
using CustomExtensions.DataAnnotations;
namespace Ebuy.DataAccess
@@ -26,9 +24,6 @@ public void InitializeDatabase(DataContext context)
protected virtual void Seed(DataContext context)
{
- var conn = new SqlConnectionStringBuilder(context.Database.Connection.ConnectionString);
- SqlServices.Install(conn.InitialCatalog, SqlFeatures.Membership | SqlFeatures.RoleManager, conn.ConnectionString);
-
// Apply the custom UniqueAttribute to set unique constraints
// on columns with the attribute defined
new UniqueConstraintApplier().ApplyUniqueConstraints(context);
View
2 Core/DataAccess/DataContext.cs
@@ -9,8 +9,6 @@ public partial class DataContext : DbContext
public DbSet<Auction> Auctions { get; set; }
public DbSet<Bid> Bids { get; set; }
public DbSet<Category> Categories { get; set; }
- public DbSet<Product> Products { get; set; }
- public DbSet<Review> Reviews { get; set; }
public DbSet<User> Users { get; set; }
public override int SaveChanges()
View
2 Core/Ebuy.Core.csproj
@@ -61,9 +61,7 @@
<Compile Include="Model\Entity.cs" />
<Compile Include="Model\EntityKeyGenerationException.cs" />
<Compile Include="Model\Payment.cs" />
- <Compile Include="Model\Product.cs" />
<Compile Include="Model\WebsiteImage.cs" />
- <Compile Include="Model\Review.cs" />
<Compile Include="Model\User.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Util\Clock.cs" />
View
2 Core/Model/Auction.cs
@@ -32,8 +32,6 @@ public bool IsCompleted
public virtual ICollection<WebsiteImage> Images { get; set; }
- public virtual Product Product { get; set; }
-
public long OwnerId { get; set; }
public virtual User Owner { get; set; }
View
2 Core/Model/Category.cs
@@ -12,8 +12,6 @@ public class Category : Entity<long>
public virtual ICollection<Category> SubCategories { get; set; }
- public virtual ICollection<Product> Products { get; set; }
-
public Category()
{
View
57 Core/Model/Product.cs
@@ -1,57 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-
-namespace Ebuy
-{
- [MetadataType(typeof(Category.Metadata))]
- public class Product : Entity<long>
- {
- public string Name { get; set; }
- public string Description { get; set; }
-
- public double Rating
- {
- get { return _rating.Value; }
- }
- private readonly Lazy<double> _rating;
-
- public virtual ICollection<Auction> Auctions { get; set; }
-
- public virtual ICollection<Category> Categories { get; set; }
-
- public virtual ICollection<WebsiteImage> Images { get; set; }
-
- public virtual ICollection<Review> Reviews { get; set; }
-
- public Product()
- {
- _rating = new Lazy<double>(() => Reviews.Average(x => x.Rating));
- }
-
- protected override string GenerateKey()
- {
- if (string.IsNullOrWhiteSpace(Name))
- // TODO: Localize
- throw new EntityKeyGenerationException(GetType(), "Name is empty");
-
- return KeyGenerator.Generate(Name);
- }
-
- public class Metadata
- {
- [Required]
- public object Categories;
-
- [Required]
- public object Description;
-
- [Required, StringLength(2000)]
- public object ImageUrl;
-
- [Required, StringLength(500)]
- public object Name;
- }
- }
-}
View
25 Core/Model/Review.cs
@@ -1,25 +0,0 @@
-using System;
-using System.ComponentModel.DataAnnotations;
-
-namespace Ebuy
-{
- [MetadataType(typeof(Review.Metadata))]
- public class Review : Entity<Guid>
- {
- public string Description { get; set; }
- public double Rating { get; set; }
-
- public virtual Product Product { get; set; }
- public virtual User User { get; set; }
-
-
- public class Metadata
- {
- [StringLength(1000)]
- public object Description;
-
- [Range(0, 5)] // Five-star rating system
- public object Rating;
- }
- }
-}
View
3 Core/Model/User.cs
@@ -25,8 +25,6 @@ public virtual string DisplayName
public virtual ICollection<Payment> Payments { get; private set; }
- public virtual ICollection<Review> Reviews { get; private set; }
-
[Unique]
public string Username { get; set; }
@@ -37,7 +35,6 @@ public User()
{
// Bids = new Collection<Bid>();
Payments = new Collection<Payment>();
- Reviews = new Collection<Review>();
WatchedAuctions = new Collection<Auction>();
}
View
2 IntegrationTests/App.config
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
- <add name="DataContext" providerName="System.Data.SqlServerCe.4.0" connectionString="Data Source=Database.sdf" />
+ <add name="Ebuy.DataAccess.DataContext" connectionString="Data Source=Database.sdf" providerName="System.Data.SqlServerCe.4.0" />
</connectionStrings>
</configuration>
View
35 IntegrationTests/Core/DataAccess/ProductPersistenceTests.cs
@@ -1,35 +0,0 @@
-using System.Linq;
-using Ebuy;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace IntegrationTests.Core.DataAccess
-{
- [TestClass]
- public class ProductPersistenceTests : RepositoryTestFixture
- {
- [TestMethod]
- public void ShouldSaveNewProduct()
- {
- var product = CreateNewEntity<Product>();
-
- Repository.Add(product);
- AssertSavedEntityExists(product);
- }
-
- [TestMethod]
- public void ShouldSaveNewProductCategories()
- {
- var product = CreateNewEntity<Product>();
-
- var categories = product.Categories.Select(x => x.Key).ToArray();
- AssertNoSavedEntitiesMatching<Category>(x => categories.Contains(x.Key));
-
- Repository.Add(product);
-
- foreach (var category in product.Categories)
- {
- AssertSavedEntityExists(category);
- }
- }
- }
-}
View
1 IntegrationTests/IntegrationTests.csproj
@@ -71,7 +71,6 @@
<Compile Include="Core\DataAccess\AuctionPersistenceTests.cs" />
<Compile Include="Core\DataAccess\CategoryPersistenceTests.cs" />
<Compile Include="Core\DataAccess\DataContextTestFixture.cs" />
- <Compile Include="Core\DataAccess\ProductPersistenceTests.cs" />
<Compile Include="Core\DataAccess\RepositoryTests.cs" />
<Compile Include="Core\DataAccess\UserPersistenceTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
View
23 IntegrationTests/TestDataGenerator.cs
@@ -24,9 +24,6 @@ public T GenerateValid<T>()
if (type == typeof(Category))
return (T)GenerateValidCategory();
- if (type == typeof(Product))
- return (T)GenerateValidProduct();
-
if (type == typeof(User))
return (T)GenerateValidUser();
@@ -36,15 +33,13 @@ public T GenerateValid<T>()
protected virtual object GenerateValidAuction()
{
var id = Random();
- var auction = new Auction()
- {
+ var auction = new Auction {
Title = "Test Auction #" + id,
Description = "Description for test auction #" + id,
CurrentPrice = "$1",
StartTime = Clock.Now,
EndTime = Clock.Now.AddDays(7),
Owner = GenerateValid<User>(),
- Product = GenerateValid<Product>(),
Categories = new[] { GenerateValid<Category>(), GenerateValid<Category>() },
};
@@ -59,26 +54,14 @@ protected virtual object GenerateValidCategory()
return new Category { Name = "Test Category #" + id };
}
- protected virtual object GenerateValidProduct()
- {
- var id = Random();
- return new Product()
- {
- Categories = new[] { GenerateValid<Category>(), GenerateValid<Category>() },
- Name = "Test product " + id,
- Description = "Test product " + id,
- Images = new WebsiteImage[] { "http://www.test.com/image.png" },
- };
- }
-
protected virtual object GenerateValidUser()
{
var id = Random();
- return new User()
- {
+ return new User {
DisplayName = "Test User #" + id,
EmailAddress = String.Format("user_{0}@email.com", id),
+ Username = "User"+id,
};
}
View
12 Programming ASP.NET MVC.sln
@@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests", "Integra
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ebuy.Website", "Website\Ebuy.Website.csproj", "{D739D3C5-5C15-4D36-B177-818DC676D57A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EBuy.AdminArea", "AdminArea\EBuy.AdminArea.csproj", "{C7EFCA67-0025-4F1A-8982-394BF567A591}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -75,16 +73,6 @@ Global
{D739D3C5-5C15-4D36-B177-818DC676D57A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{D739D3C5-5C15-4D36-B177-818DC676D57A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{D739D3C5-5C15-4D36-B177-818DC676D57A}.Release|x86.ActiveCfg = Release|Any CPU
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Debug|Any CPU.ActiveCfg = Debug|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Debug|x86.ActiveCfg = Debug|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Debug|x86.Build.0 = Debug|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Release|Any CPU.ActiveCfg = Release|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Release|Mixed Platforms.Build.0 = Release|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Release|x86.ActiveCfg = Release|x86
- {C7EFCA67-0025-4F1A-8982-394BF567A591}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
View
24 Website/App_Start/DataAccess.cs
@@ -1,13 +1,10 @@
using System.Configuration;
using System.Data.Entity;
-using System.Linq;
-using System.Web.Security;
using Devtalk.EF.CodeFirst;
using Ebuy.DataAccess;
using Ebuy.Website.App_Start;
[assembly: WebActivator.PreApplicationStartMethod(typeof(DataAccess), "InitializeDatabase")]
-[assembly: WebActivator.PostApplicationStartMethod(typeof(DataAccess), "CreateAdminUser")]
namespace Ebuy.Website.App_Start
{
@@ -34,26 +31,5 @@ public static void InitializeDatabase()
context.Database.Initialize(false);
}
}
-
- public static void CreateAdminUser()
- {
- using (var context = new DataContext())
- {
- var admin = new User {
- DisplayName = "Administrator",
- EmailAddress = "admin@ebuy.com",
- Username = "admin",
- };
-
- if (!context.Users.Any(x => x.Key == admin.Key))
- {
- context.Users.Add(admin);
- context.SaveChanges();
-
- MembershipCreateStatus status;
- Membership.CreateUser(admin.Username, "Password!", admin.EmailAddress, null, null, true, null, out status);
- }
- }
- }
}
}
View
39 Website/App_Start/InitializeMembership.cs
@@ -0,0 +1,39 @@
+using System.Data.SqlClient;
+using System.Linq;
+using System.Web.Management;
+using System.Web.Security;
+using Ebuy.DataAccess;
+using Ebuy.Website.App_Start;
+
+[assembly: WebActivator.PostApplicationStartMethod(typeof(InitializeMembership), "CreateAdminUser")]
+
+namespace Ebuy.Website.App_Start
+{
+ public static class InitializeMembership
+ {
+ public static void CreateAdminUser()
+ {
+ using (var context = new DataContext())
+ {
+ var admin = new User
+ {
+ DisplayName = "Administrator",
+ EmailAddress = "admin@ebuy.com",
+ Username = "admin",
+ };
+
+ if (!context.Users.Any(x => x.Key == admin.Key))
+ {
+ context.Users.Add(admin);
+ context.SaveChanges();
+
+ var conn = new SqlConnectionStringBuilder(context.Database.Connection.ConnectionString);
+ SqlServices.Install(conn.InitialCatalog, SqlFeatures.Membership | SqlFeatures.RoleManager, conn.ConnectionString);
+
+ MembershipCreateStatus status;
+ Membership.CreateUser(admin.Username, "Password!", admin.EmailAddress, null, null, true, null, out status);
+ }
+ }
+ }
+ }
+}
View
9 Website/Areas/Admin/Models/UserViewModel.cs
@@ -1,8 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
+using System.Collections.Generic;
+
namespace Ebuy.Website.Areas.Admin.Models
{
public class UserViewModel
@@ -24,8 +21,6 @@ public virtual string DisplayName
public virtual ICollection<Payment> Payments { get; private set; }
- public virtual ICollection<Review> Reviews { get; private set; }
-
public virtual ICollection<Auction> WatchedAuctions { get; private set; }
}
}
View
23 Website/Controllers/AuctionsController.cs
@@ -1,4 +1,4 @@
-using System;
+using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using AutoMapper;
@@ -18,13 +18,10 @@ public AuctionsController(IRepository repository)
}
[Route("auctions")]
- public ActionResult Index(int page = 0, int pageSize = 25)
+ public ActionResult Index()
{
- var auctions = this.ApplyPaging(_repository.All<Auction>().Active());
-
- var viewModel = auctions.Select(Mapper.DynamicMap<AuctionViewModel>);
-
- return View("Auctions", viewModel);
+ var auctions = _repository.All<Auction>();
+ return ActiveAuctionsResult(auctions);
}
[Route("auctions/{key}-{title}")]
@@ -108,9 +105,17 @@ public ActionResult FeaturedAuctions()
}
[Route("categories/{key}")]
- public ActionResult Category(string key, int pageIndex, int pageSize)
+ public ActionResult Category(string key, int pageIndex = 0, int pageSize = 25)
+ {
+ var auctions = _repository.Query<Auction>(x => x.Categories.Any(cat => cat.Key == key));
+ return ActiveAuctionsResult(auctions);
+ }
+
+ private ActionResult ActiveAuctionsResult(IEnumerable<Auction> auctions)
{
- throw new NotImplementedException();
+ var viewModel = this.ApplyPaging(auctions.Active()).Select(Mapper.DynamicMap<AuctionViewModel>);
+
+ return View("Auctions", viewModel);
}
}
}
View
5 Website/Ebuy.Website.csproj
@@ -128,6 +128,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="App_Start\Areas.cs" />
+ <Compile Include="App_Start\InitializeMembership.cs" />
<Compile Include="App_Start\ModelBinding.cs" />
<Compile Include="App_Start\Filters.cs" />
<Compile Include="App_Start\DataAccess.cs" />
@@ -284,10 +285,6 @@
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\AdminArea\EBuy.AdminArea.csproj">
- <Project>{C7EFCA67-0025-4F1A-8982-394BF567A591}</Project>
- <Name>EBuy.AdminArea</Name>
- </ProjectReference>
<ProjectReference Include="..\Core\Ebuy.Core.csproj">
<Project>{EFD6F198-A4E8-419E-ABBC-8573B29ACC42}</Project>
<Name>Ebuy.Core</Name>
View
2 Website/Models/CategoryViewModel.cs
@@ -5,6 +5,8 @@ public class CategoryViewModel
public string Key { get; set; }
public string Name { get; set; }
+
+ public int AuctionsCount { get; set; }
}
}
View
3 Website/Views/Auctions/_AuctionTile.cshtml
@@ -17,8 +17,5 @@
<span class="current-bid-amount">@Model.CurrentPrice</span>
<span class="current-bidder">@Model.WinningBidUsername</span>
</p>
- <p>
- <span><a href="StartNewAuction()">Bid Now</a></span>
- </p>
</div>
</div>
View
2 Website/Views/Home/Homepage.cshtml
@@ -46,7 +46,7 @@
<ul id="categories" class="content-wrapper">
@foreach (var category in Model.Categories)
{
- <li class="category"><a href="@Url.Category(category)">@category.Name</a></li>
+ <li class="category"><a href="@Url.Category(category)">@category.Name</a> (@category.AuctionsCount)</li>
}
</ul>
</div>

0 comments on commit a24772e

Please sign in to comment.
Something went wrong with that request. Please try again.