public static RepositoryManager<PPPObjectContext> GetManager()
        {
            try
            {
                var ctx = new PPPObjectContext();
                var mgr = new RepositoryManager<PPPObjectContext>(ctx);

                return mgr;
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#2
0
 static bool VerificarConexionDB()
 {
     PPPObjectContext objectContext;
     try
     {
         objectContext = new PPPObjectContext();
         objectContext.Connection.Open();
         objectContext.ProyectoSet.Count();
     }
     catch (Exception)
     {
         return false;
     }
     return true;
 }