Exemplo n.º 1
0
        //Language Name
        public List <MediaModel> ListMediaByLanguageName(string languageName)
        {
            List <MediaModel> medias = new List <MediaModel>();

            MediaDS.ViewMediaDataTable mediaTable = mediaDAO.ListMediaByLanguageName(languageName);

            foreach (MediaDS.ViewMediaRow row in mediaTable.Rows)
            {
                MediaModel media = MediaModel.Parse(row);
                medias.Add(media);
            }
            return(medias);
        }
Exemplo n.º 2
0
        public List <MediaModel> ListMedia()
        {
            //empty list of media models to start us off
            List <MediaModel> medias = new List <MediaModel>();

            MediaDS.ViewMediaDataTable mediaTable = mediaDAO.ListMedia();

            foreach (MediaDS.ViewMediaRow row in mediaTable.Rows)
            {
                //create a model representing that row
                MediaModel media = MediaModel.Parse(row);
                medias.Add(media);//add it to our list of media
            }
            return(medias);
        }