Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class CategoryRepositoryExtensions
- {
- public static Category GetRootCategory(this IRepository<Category> categoryRepository)
- {
- return categoryRepository.GetById(1);
- }
- }
- ICategoryRepoitory : IRepository<Category>
- {
- Category GetRootCategory();
- }
- using CategoryRepositoryExtensions;
- ...
- Category c = r.GetRootCategory();
- Category c = CategoryRepositoryExtensions.GetRootCategory(r);
- <IEnumerable> orders1Enumerable = OrderRepository.GetAllOrders()
- .ContainingProductCode(x);
- <IEnumerable> orders2Enumerable = OrderRepository.GetAllOrders()
- .ContainingProductCode(x)
- .WithShippingZipCode(y);
Add Comment
Please, Sign In to add comment