public void MyTestInitialize() { EffortProviderFactory.ResetDb(); EntityConnection connection = EntityConnectionFactory.CreateTransient("name=ISSEntities2"); //var connection = DbConnectionFactory.CreateTransient(); _context = new ISSEntities2(connection); _repository = new RepoUserDB(_context); }
static void Main(string[] args) { new Thread(() => { while (true) { using (var context = new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())) { //context.automaticJob(); } Thread.Sleep(1000 * 60 * 60 * 24); } }).Start(); Persistence.Repository.RepoAvailableRoomDB repoAR = new Persistence.Repository.RepoAvailableRoomDB(new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())); Persistence.Repository.RepoConference repoC = new Persistence.Repository.RepoConference(new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())); Persistence.Repository.RepoMessageDB repoM = new Persistence.Repository.RepoMessageDB(new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())); Persistence.Repository.RepoPaperDB repoPap = new Persistence.Repository.RepoPaperDB(new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())); Persistence.Repository.RepoParticipantDB repoPar = new Persistence.Repository.RepoParticipantDB(new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())); Persistence.Repository.RepoPayment repoPay = new Persistence.Repository.RepoPayment(new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())); Persistence.Repository.RepoUserDB repoU = new Persistence.Repository.RepoUserDB(new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())); Persistence.Repository.RepoSessionDB repoS = new Persistence.Repository.RepoSessionDB(new ISSEntities2(Persistence.Util.ConnectionStringWithPassword.doIt())); BinaryServerFormatterSinkProvider servProv = new BinaryServerFormatterSinkProvider(); servProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full; BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider(); IDictionary props = new Hashtable(); props["port"] = 11111; TcpChannel channel = new TcpChannel(props, clientProv, servProv); ChannelServices.RegisterChannel(channel, false); var server = new ServerImplementation(repoU, repoAR, repoC, repoM, repoPap, repoPar, repoPay, repoS); RemotingServices.Marshal(server, "Conferences"); Console.WriteLine("Server go"); Console.ReadLine(); }
public RepoConference(ISSEntities2 context) { _context = context; }
public RepoSessionDB(ISSEntities2 context) { _context = context; }
public RepoUserDB(ISSEntities2 context) { _context = context; }
public RepoMessageDB(ISSEntities2 context) { _context = context; }
public RepoPayment(ISSEntities2 context) { _context = context; }
public RepoParticipantDB(ISSEntities2 context) { _context = context; }
public RepoAvailableRoomDB(ISSEntities2 context) { _context = context; }