Пример #1
0
 public override ContextWorker.MainContext GetContext(ContextWorker.ContextMode mode, string serverNameORPath, string dataBaseName, string userName, string userPassword)
 {
     switch (mode)
     {
         //case ContextWorker.ContextMode.MSSQL:
         //    return new ContextWorker.MSSQL.MSSQLContext(String.Format(ContextWorker.DBConnectionStringsTemplate.MSSQL_CONN_STR, serverNameORPath, dataBaseName, userName, userPassword));
         case ContextWorker.ContextMode.SDF:
             return new ContextWorker.SDF.SDFContext(String.Format(ContextWorker.DBConnectionStringsTemplate.SDF_CONN_STR, serverNameORPath, dataBaseName, userPassword));
         //case ContextWorker.ContextMode.MDF:
         //    return new ContextWorker.MDF.MDFContext(String.Format(ContextWorker.DBConnectionStringsTemplate.MDF_CONN_STR, dataBaseName, userName, userPassword));
         default: return null;
     }
 }
 public CompaniesController()
 {
     _context = new ContextWorker();
 }
Пример #3
0
 public RentsController()
 {
     _context = new ContextWorker();
 }
 public PlanesController()
 {
     _context = new ContextWorker();
 }