public static List<Categoria> ListAll() { FiltroCategorias f = new FiltroCategorias(); return List(f); }
public static List<Categoria> List(FiltroCategorias f) { List<Categoria> resulList = new List<Categoria>(); try { CategoriaDS dataservice = new CategoriaDS(); DataSet listado = dataservice.List(f); if (listado.Tables.Count > 0) { foreach (DataRow d in listado.Tables[0].Rows) { Categoria c = new Categoria(); ORM(c, d); resulList.Add(c); } } } catch (Exception ex) { throw ex; } return resulList; }