Ejemplo n.º 1
0
        /// <summary>
        /// Constructor function that copys a media row
        /// </summary>
        /// <param name="mediaRow"></param>

        public MediaDTO(Model.MediaDTO mediaRow)
        {
            MediaID  = mediaRow.MediaID;
            Title    = mediaRow.Title;
            Genre    = new GenreDTO(mediaRow.Genre);
            Language = new LanguageDTO(mediaRow.Language);
            Director = new DirectorDTO(mediaRow.Director);
            Year     = mediaRow.Year;
            this.SetBudget(mediaRow.Budget * 1000000);
        }
Ejemplo n.º 2
0
 public MediaDTO(string title, GenreDTO genre, DirectorDTO director, LanguageDTO language, int year, decimal budgetValue, int?mediaID = null)
 {
     if (mediaID != null)
     {
         MediaID = (int)mediaID;
     }
     Title    = title;
     Genre    = genre;
     Director = director;
     Language = language;
     Year     = year;
     this.SetBudget(budgetValue);
 }