Ejemplo n.º 1
0
 public void CalculatorController_Setup()
 {
     _ratingDetailService  = new RatingDetailService();
     _occupationService    = new OccupationService(_ratingDetailService);
     _calculatorService    = new CalculatorService(_occupationService);
     _calculatorController = new CalculatorController(_calculatorService);
 }
Ejemplo n.º 2
0
 public BookController(IRatingDetailService ratingDetailService, IEmailService emailService, IAuthorizationService authorizationService, IHostingEnvironment hostingEnvironment, IMerchantService merchantService, IBookCategoryService bookCategoryService, IBookService bookService, IUnitOfWork unitOfWork)
 {
     _ratingDetailService  = ratingDetailService;
     _emailService         = emailService;
     _authorizationService = authorizationService;
     _bookService          = bookService;
     _bookCategoryService  = bookCategoryService;
     _unitOfWork           = unitOfWork;
     _merchantService      = merchantService;
     _hostingEnvironment   = hostingEnvironment;
 }
 public BeyeuBookstoreController(IBookService bookService, SignInManager <User> signInManager, IUserService userService, IInvoiceService invoiceService, ICustomerService customerService, IInvoiceDetailService invoiceDetailService, IRatingDetailService ratingDetailService, UserManager <User> userManager, IEmailSender emailSender, IAdvertiseContractService advertiseContractService, ERPDbContext context, IDeliveryService deliveryService)
 {
     _bookService              = bookService;
     _signInManager            = signInManager;
     _userService              = userService;
     _invoiceService           = invoiceService;
     _customerService          = customerService;
     _invoiceDetailService     = invoiceDetailService;
     _ratingDetailService      = ratingDetailService;
     _userManager              = userManager;
     _emailSender              = emailSender;
     _advertiseContractService = advertiseContractService;
     _context         = context;
     _deliveryService = deliveryService;
 }
        public OccupationService(IRatingDetailService ratingDetailService)
        {
            _ratingDetailService = ratingDetailService;

            // This can come from repository using EF
            _occupations = new List <Occupation>();
            _occupations.Add(new Occupation {
                ID = 1, Name = "Cleaner", RatingDetail = new RatingDetail {
                    ID = 3
                }
            });
            _occupations.Add(new Occupation {
                ID = 2, Name = "Doctor", RatingDetail = new RatingDetail {
                    ID = 1
                }
            });
            _occupations.Add(new Occupation {
                ID = 3, Name = "Author", RatingDetail = new RatingDetail {
                    ID = 2
                }
            });
            _occupations.Add(new Occupation {
                ID = 4, Name = "Farmer", RatingDetail = new RatingDetail {
                    ID = 4
                }
            });
            _occupations.Add(new Occupation {
                ID = 5, Name = "Mechanic", RatingDetail = new RatingDetail {
                    ID = 4
                }
            });
            _occupations.Add(new Occupation {
                ID = 6, Name = "Florist", RatingDetail = new RatingDetail {
                    ID = 3
                }
            });
            //
        }