public static Goles SelectByJugador(int idJugador) { GolesDSTableAdapters.tbl_golesTableAdapter adapter = new GolesDSTableAdapters.tbl_golesTableAdapter(); GolesDS.tbl_golesDataTable table = adapter.SelectByJugador(idJugador); if (table.Rows.Count == 0) { return(null); } return(RowToDto(table[0])); }
public static List <Goles> SelectByEvento(int idEvento) { GolesDSTableAdapters.tbl_golesTableAdapter adapter = new GolesDSTableAdapters.tbl_golesTableAdapter(); GolesDS.tbl_golesDataTable table = adapter.SelectByEvento(idEvento); List <Goles> listGoles = new List <Goles>(); foreach (GolesDS.tbl_golesRow row in table) { listGoles.Add(RowToDto(row)); } return(listGoles); }