示例#1
0
 public MediaDTO(int mediaID, string title, GenreDTO genre, DirectorDTO director, LanguageDTO language, int year, decimal budget)
 {
     MediaID  = mediaID;
     Title    = title;
     Genre    = genre;
     Director = director;
     Language = language;
     Year     = year;
     Budget   = budget;
 }
示例#2
0
        MediaDTO Translate(DataRow record)
        {
            GenreDTO    Genre    = new GenreDTO(record.Field <int>("Genre"), record.Field <string>("GenreName"));
            LanguageDTO Language = new LanguageDTO(record.Field <int>("Language"), record.Field <string>("LanguageName"));
            DirectorDTO Director = new DirectorDTO(record.Field <int>("Director"), record.Field <string>("DirectorName"));

            return(new MediaDTO(
                       record.Field <int>("MediaID"),
                       record.Field <string>("Title"),
                       Genre, Director, Language,
                       record.Field <int>("PublishYear"),
                       record.Field <decimal>("Budget")
                       ));;
        }