Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lizhi5753186/OnlineStore_Second
Browse files Browse the repository at this point in the history
Conflicts:
	OnlineStore.Application/App_Data/OnlineStore.mdf
	OnlineStore.Application/App_Data/OnlineStore_log.ldf
	OnlineStore.Domain/Repositories/IProductCategorizationRepository.cs
	OnlineStore.Repositories/EntityFramework/ProductCategorizationRepository.cs
	OnlineStore.Web/Service References/OnlineStoreDto.Partial.cs
	OnlineStore.Web/Views/Home/Category.cshtml
  • Loading branch information
learninghard-lizhi committed Jun 7, 2015
2 parents 938fff1 + a8c7815 commit 2f3c508
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ public interface IProductCategorizationRepository : IRepository<ProductCategoriz
/// <param name="pageSize">所请求的页大小</param>
/// <returns>指定分类下的某页的商品信息</returns>
PagedResult<Product> GetProductsForCategoryWithPagination(Category category, int pageNumber, int pageSize);
<<<<<<< HEAD

/// <summary>
/// 获取商品所属的商品分类。
/// </summary>
/// <param name="product">商品信息。</param>
/// <returns>商品分类。</returns>
Category GetCategoryForProduct(Product product);
=======
>>>>>>> a8c78153bbcbc0d2584fbf09194fc3c900081a3f
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ orderby product.Name ascending
var pagedQuery = query.Skip(skip).Take(take).GroupBy(p => new {Total = query.Count()}).FirstOrDefault();
return pagedQuery == null ? null : new PagedResult<Product>(pagedQuery.Key.Total, (pagedQuery.Key.Total + pageSize - 1) / pageSize, pageSize, pageNumber, pagedQuery.Select(p => p).ToList());
}
<<<<<<< HEAD

public Category GetCategoryForProduct(Product product)
{
Expand All @@ -60,5 +61,7 @@ from categorization in context.ProductCategorizations
select category;
return query.FirstOrDefault();
}
=======
>>>>>>> a8c78153bbcbc0d2584fbf09194fc3c900081a3f
}
}
3 changes: 3 additions & 0 deletions OnlineStore.Web/Service References/OnlineStoreDto.Partial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public override string ToString()
}
}
}
<<<<<<< HEAD

namespace OnlineStore.Web.ProductService
{
Expand All @@ -91,3 +92,5 @@ public string CategoryName
}
}

=======
>>>>>>> a8c78153bbcbc0d2584fbf09194fc3c900081a3f
4 changes: 4 additions & 0 deletions OnlineStore.Web/Views/Home/Category.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<<<<<<< HEAD
<<<<<<< HEAD
@{Html.RenderAction("ProductsPartial", "Layout", new { categoryId = ViewData["CategoryId"], fromIndexPage = ViewData["FromIndexPage"] });}
=======
@{Html.RenderAction("ProductsPartial", "Layout", new { categoryID = ViewData["CategoryId"], fromIndexPage = ViewData["FromIndexPage"] });}
>>>>>>> a8c78153bbcbc0d2584fbf09194fc3c900081a3f
=======
@{Html.RenderAction("ProductsPartial", "Layout", new { categoryID = ViewData["CategoryId"], fromIndexPage = ViewData["FromIndexPage"] });}
>>>>>>> a8c78153bbcbc0d2584fbf09194fc3c900081a3f

0 comments on commit 2f3c508

Please sign in to comment.