//search by genre public List <MediaModel> ListMediaGenre(string genre) { List <MediaModel> medias = new List <MediaModel>(); mediaTable = mediaDAO.ListMediaByGenre(genre); foreach (MediaDS.ViewMediaRow row in mediaTable.Rows) { MediaModel media = MediaModel.Parse(row); medias.Add(media); } return(medias); }
public List <MediaModel> ListMediaByGenre(String genre) { try { List <MediaModel> medias = new List <MediaModel>(); mediaTable = mediaDAO.ListMediaByGenre(genre); foreach (MediaDS.ViewMediaRow row in mediaTable.Rows) { MediaModel media = MediaModel.Parse(row); medias.Add(media); } return(medias); } catch (Exception ex) { throw ex; } }