Exemple #1
0
 public static List <PI_BA_Categoria> GetCategoriasByConvocatoria(String idConvocatoria)
 {
     using (var dbContext = new wPremiosInstitucionalesdbEntities())
     {
         try
         {
             return(dbContext.GetCategoria(null, idConvocatoria).ToList());
         }
         catch (Exception Ex)
         {
             Console.WriteLine("Catched Exception: " + Ex.Message + Environment.NewLine);
             return(null);
         }
     }
 }
Exemple #2
0
 public static PI_BA_Categoria GetCategoriaById(String idCategoria)
 {
     using (var dbContext = new wPremiosInstitucionalesdbEntities())
     {
         try
         {
             return(dbContext.GetCategoria(idCategoria, null).FirstOrDefault());
         }
         catch (Exception Ex)
         {
             Console.WriteLine("Catched Exception: " + Ex.Message + Environment.NewLine);
             return(null);
         }
     }
 }