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); } } }
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); } } }