static void Main() { SQLiteConnection m_dbConnection = new SQLiteConnection("Data Source=/Users/Alex/IdeaProjects/Databases/FestivaluriDB.db;Version=3;"); AngajatRepository repoAngajat = new AngajatRepository(m_dbConnection); BiletRepository repoBilet = new BiletRepository(m_dbConnection); SpectacolRepository repoSpectacol = new SpectacolRepository(m_dbConnection); ArtistiRepository repoArtist = new ArtistiRepository(m_dbConnection); /* * var container = Config.Configure(); * * using (var scope = container.BeginLifetimeScope()) * { * Angajat a = new Angajat("aaa", "hhh", "lll"); * var app = scope.Resolve<IAngajatRepository>(); * foreach(var x in app.findAll()) * { * Console.WriteLine(x); * } * Console.ReadKey(); * }*/ LoginService servLogin = new LoginService(repoAngajat); ConcerteService servConcerte = new ConcerteService(repoBilet, repoSpectacol, repoArtist); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1(servLogin, servConcerte)); }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); XmlConfigurator.Configure(new System.IO.FileInfo(args[0])); Console.WriteLine("Configuration Settings for database {0}", GetConnectionStringByName("database")); IDictionary <String, string> props = new SortedList <String, String>(); props.Add("ConnectionString", GetConnectionStringByName("database")); IClientRepo clientRepository = new ClientRepository(props); IZborRepo zborRepository = new ZborRepository(props); AngajatRepository angajatRepository = new AngajatRepository(props); IBiletRepo biletRepository = new BiletRepository(props); Service service = new Service(angajatRepository, zborRepository, clientRepository, biletRepository); LogInForm logInForm = new LogInForm(); MainWindowForm mainWindowForm = new MainWindowForm(); logInForm.SetService(service); logInForm.setMain(mainWindowForm); mainWindowForm.SetService(service); mainWindowForm.SetLogIn(logInForm); Application.Run(logInForm); }
static void Main(string[] args) { XmlConfigurator.Configure(new System.IO.FileInfo(args[0])); Console.WriteLine("Configuration Settings for database {0}", GetConnectionStringByName("database")); IDictionary <String, string> props = new SortedList <String, String>(); props.Add("ConnectionString", GetConnectionStringByName("database")); BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider(); serverProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full; BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider(); IDictionary dictionary = new Hashtable(); dictionary["port"] = 55555; TcpChannel channel = new TcpChannel(dictionary, clientProvider, serverProvider); ChannelServices.RegisterChannel(channel, false); AngajatRepository angajatRepo = new AngajatRepository(props); IZborRepo zborRepo = new ZborRepository(props); IClientRepo clientRepo = new ClientRepository(props); IBiletRepo biletRepo = new BiletRepository(props); var server = new FlightServerImpl(angajatRepo, zborRepo, clientRepo, biletRepo); RemotingServices.Marshal(server, "zboruri"); Console.WriteLine("Server started ..."); Console.ReadLine(); }
static void Main(string[] args) { //XmlConfigurator.Configure(new System.IO.FileInfo(args[0])); //Console.WriteLine("Configuration Settings for agentie {0}", GetConnectionStringByName("agentie")); IDictionary <String, string> props = new SortedList <String, String>(); props.Add("ConnectionString", GetConnectionStringByName("agentie")); IAngajatRepository <string, string> repoA = new AngajatRepository(props); AngajatService srvA = new AngajatService(repoA); IClientRepository repoC = new ClientRepository(props); ClientService srvC = new ClientService(repoC); IZborRepository repoZ = new ZborRepository(props); ZborService srvZ = new ZborService(repoZ); IBiletRepository repoB = new BiletRepository(props); BiletService srvB = new BiletService(repoB, repoC, repoZ); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Form2 form2 = new Form2(); form2.setService(srvA, srvC, srvZ, srvB); Application.Run(form2); }
public EntityService() { _biletService = new BiletRepository(); _calisanService = new CalisanRepository(); _filmService = new FilmRepository(); _filmturService = new FilmTurRepository(); _musteriService = new MusteriRepository(); _salonService = new SalonRepository(); _seansService = new SeansRepository(); }