public OrderedProductBusinessService(IOrderedProductRepository orderedProductRepository) : base(orderedProductRepository) { //override the base class methods to your specfication //and make a call to the base class methods to perform common CRUD functionalities //generics is used to factor out common CRUD functionalities }
private void Dispose(bool dispose) { if (dispose) { if (_userRepository != null) { _userRepository = null; } if (_categoryRepository != null) { _categoryRepository = null; } if (_imageRepository != null) { _imageRepository = null; } if (_orderedProductRepository != null) { _orderedProductRepository = null; } if (_orderRepository != null) { _orderRepository = null; } if (_productRepository != null) { _productRepository = null; } if (_shoppingCartRepository != null) { _shoppingCartRepository = null; } } }
public ProjectController(IProjectRepository projectRepository, IOrderedProductRepository orderedProductRepository) { _projectRepository = projectRepository; _orderedProductRepository = orderedProductRepository; }