Пример #1
0
        //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);
        }
Пример #2
0
        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;
            }
        }