/// <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; }
/// <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; }
static void Main(string[] args) { IApplicationContext bootstrapContext = ContextRegistry.GetContext(); IBusinessLogicLayer bl = bootstrapContext.GetObject("BL") as IBusinessLogicLayer; bl?.ValidateCustomer(); Console.Read(); }
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(); }
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(); }
//Contstuctor that takes arguments from Ninject public AdminController(IBusinessLogicLayer businessLayerParam, IUserLayer userLayerParam) { businessLayer = businessLayerParam; userLayer = userLayerParam; }
public PaymentController(IBusinessLogicLayer bll) : base(bll) { }
public ProductController(IBusinessLogicLayer bll) : base(bll) { }
public SupplierController(IBusinessLogicLayer bll) : base(bll) { }
public CustomerController(IBusinessLogicLayer bll) : base(bll) { }
public UserController(IBusinessLogicLayer businessLogicLayer, IRepository <User> userRepository) { this.businessLogicLayer = businessLogicLayer; this.userRepository = userRepository; }
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; }
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; }
public AccountController(IBusinessLogicLayer bll) : base(bll) { }
public BaseController(IBusinessLogicLayer bll) { this.bll = bll; }
//Contstuctor that takes argument from Ninject public ProductController(IBusinessLogicLayer businessLayerParam) { businessLayer = businessLayerParam; }
//Contstuctor that takes arguments from Ninject public CartViewModel(IBusinessLogicLayer businessLogicLayerParam) { CartLineViewModels = new List <CartLineViewModel>(); businessLayer = businessLogicLayerParam; }
public FilterViewModel() { businessLayer = new EFBusinessLogicLayer(); MinimumLimit = businessLayer.GetPriceLimit(true); MaximumLimit = businessLayer.GetPriceLimit(false); }
/// <summary> /// Инициализация класса логики(Логика будет только одна) /// </summary> public static void Init() { if (_logic == null) _logic = new Logic(); }
public HomeController(IBusinessLogicLayer bll) : base(bll) { }
public OrderController(IBusinessLogicLayer bll) : base(bll) { }