public Service(ApplicationDbContext context) { // repository BillingAddressRepository = new Repository <BillingAddress>(context); CategoryRepository = new Repository <Category>(context); ImageRepository = new Repository <Image>(context); ManufacturerRepository = new Repository <Manufacturer>(context); OrderRepository = new Repository <Order>(context); OrderItemRepository = new Repository <OrderItem>(context); ProductRepository = new Repository <Product>(context); ProductCategoryMapping = new Repository <ProductCategoryMapping>(context); ProductImageMapping = new Repository <ProductImageMapping>(context); ProductManufacturerMapping = new Repository <ProductManufacturerMapping>(context); ProductSpecificationMapping = new Repository <ProductSpecificationMapping>(context); ReviewRepository = new Repository <Review>(context); SpecificationRepository = new Repository <Specification>(context); VisitorCountRepository = new Repository <VisitorCount>(context); OrderCountRepository = new Repository <OrderCount>(context); ContactUsMessageRepository = new Repository <ContactUsMessage>(context); // service BillingAddressService = new BillingAddressService(context, BillingAddressRepository); CategoryService = new CategoryService(context, CategoryRepository, ProductCategoryMapping); ManufacturerService = new ManufacturerService(context, ManufacturerRepository, ProductManufacturerMapping); OrderService = new OrderService(context, OrderCountService, OrderRepository, OrderItemRepository); ImageManagerService = new ImageManagerService(ImageRepository, ProductImageMapping); ProductService = new ProductService(context, ProductRepository); ReviewService = new ReviewService(context, ReviewRepository); SpecificationService = new SpecificationService(context, SpecificationRepository, ProductSpecificationMapping); VisitorCountService = new VisitorCountService(context, VisitorCountRepository); OrderCountService = new OrderCountService(OrderCountRepository); ContactUsService = new ContactUsService(ContactUsMessageRepository); }