Ejemplo n.º 1
0
 /// <summary>
 /// Constructor for the MovieController
 /// </summary>
 /// <param name="businessLogicLayer">Class implementing the IBusinessLogicLayer interface</param>
 /// <param name="logger">Class implementing ILoggeer to log queries against</param>
 public MovieController(
     IBusinessLogicLayer businessLogicLayer,
     ILogger <MovieController> logger)
 {
     _businessLogicLayer = businessLogicLayer;
     _logger             = logger;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor for the SearchController
 /// </summary>
 /// <param name="businessLogicLayer">Class implementing the IBusinessLogicLayer interface</param>
 /// <param name="logger">Class implementing ILoggeer to log queries against</param>
 public SearchController(
     IBusinessLogicLayer businessLogicLayer,
     ILogger <SearchController> logger)
 {
     _businessLogicLayer = businessLogicLayer;
     _logger             = logger;
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            IApplicationContext bootstrapContext = ContextRegistry.GetContext();
            IBusinessLogicLayer bl = bootstrapContext.GetObject("BL") as IBusinessLogicLayer;

            bl?.ValidateCustomer();

            Console.Read();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            IApplicationContext bootstrapContext = ContextRegistry.GetContext();

            //alternatively the bootstrapContext can be created with a section in the App.Config file
            //IApplicationContext bootstrapContext = new XmlApplicationContext("Application-Config.xml");


            IBusinessLogicLayer bl = bootstrapContext.GetObject("BL") as IBusinessLogicLayer;

            bl?.ValidateCustomer();

            Console.Read();
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            _businessLogicLayer = new BLL.Utilities(new DAL.Utilities());

            //Test search methods
            Console.WriteLine(@"Testing movie search methods.");
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();

            TestGetSearchMatches(@"000");
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();

            TestReadMatchingMovies(@"tt000", @"tt0000005", 5);
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();
            Console.WriteLine();

            //Test CRUD methods
            Console.WriteLine(@"Testing movie CRUD methods.");
            Console.WriteLine(@"--------------------------------------------");

            TestReadMovie(@"AAAAAAAAAA");
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();

            TestReadMovie(@"tt0000001");
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();

            TestUpdateMovie(@"tt0000001");
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();

            TestAddMovieMovieMovie(@"aa0000001");
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();

            TestDeleteMovieMovie(@"aa0000001");
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();

            TestReadMovie(@"aa0000001");
            Console.WriteLine(@"--------------------------------------------");
            Console.WriteLine();

            //Wait for user to end console
            Console.WriteLine("Test successful.  Press any key to exit.");
            Console.ReadLine();
        }
Ejemplo n.º 6
0
 //Contstuctor that takes arguments from Ninject
 public AdminController(IBusinessLogicLayer businessLayerParam, IUserLayer userLayerParam)
 {
     businessLayer = businessLayerParam;
     userLayer     = userLayerParam;
 }
Ejemplo n.º 7
0
 public PaymentController(IBusinessLogicLayer bll) : base(bll)
 {
 }
Ejemplo n.º 8
0
 public ProductController(IBusinessLogicLayer bll) : base(bll)
 {
 }
Ejemplo n.º 9
0
 public SupplierController(IBusinessLogicLayer bll) : base(bll)
 {
 }
Ejemplo n.º 10
0
 public CustomerController(IBusinessLogicLayer bll) : base(bll)
 {
 }
Ejemplo n.º 11
0
 public UserController(IBusinessLogicLayer businessLogicLayer, IRepository <User> userRepository)
 {
     this.businessLogicLayer = businessLogicLayer;
     this.userRepository     = userRepository;
 }
Ejemplo n.º 12
0
 public FilterViewModel(IBusinessLogicLayer businessLayerParam)
 {
     businessLayer = businessLayerParam;
     MinimumLimit  = businessLayer.GetPriceLimit(true);
     MaximumLimit  = businessLayer.GetPriceLimit(false);
 }
 public ProductController(IBusinessLogicLayer businessLogicLayer, IRepository <Product> productRepository)
 {
     this.businessLogicLayer = businessLogicLayer;
     this.productRepository  = productRepository;
 }
Ejemplo n.º 14
0
 public FoodController(IBusinessLogicLayer businessLogicLayer, IRepository <Food> foodRepository)
 {
     this.businessLogicLayer = businessLogicLayer;
     this.foodRepository     = foodRepository;
 }
 public SupplierController(IServiceAgent serviceAgent, ITransactionIndexerServiceAgent txAgent, IBusinessLogicLayer businessLayer)
 {
     _businessLogicLayer = businessLayer;
     _service            = serviceAgent;
     _txAgent            = txAgent;
 }
 public AdminController(IBusinessLogicLayer businessLogicLayer)
 {
     _businessLogicLayer = businessLogicLayer;
 }
Ejemplo n.º 17
0
 public AccountController(IBusinessLogicLayer bll) : base(bll)
 {
 }
Ejemplo n.º 18
0
 public BaseController(IBusinessLogicLayer bll)
 {
     this.bll = bll;
 }
Ejemplo n.º 19
0
 //Contstuctor that takes argument from Ninject
 public ProductController(IBusinessLogicLayer businessLayerParam)
 {
     businessLayer = businessLayerParam;
 }
Ejemplo n.º 20
0
 //Contstuctor that takes arguments from Ninject
 public CartViewModel(IBusinessLogicLayer businessLogicLayerParam)
 {
     CartLineViewModels = new List <CartLineViewModel>();
     businessLayer      = businessLogicLayerParam;
 }
Ejemplo n.º 21
0
 public FilterViewModel()
 {
     businessLayer = new EFBusinessLogicLayer();
     MinimumLimit  = businessLayer.GetPriceLimit(true);
     MaximumLimit  = businessLayer.GetPriceLimit(false);
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Инициализация класса логики(Логика будет только одна)
 /// </summary>
 public static void Init()
 {
     if (_logic == null)
         _logic = new Logic();
 }
Ejemplo n.º 23
0
 public HomeController(IBusinessLogicLayer bll) : base(bll)
 {
 }
Ejemplo n.º 24
0
 public OrderController(IBusinessLogicLayer bll) : base(bll)
 {
 }