/// <summary> /// 用于向 ResMusics EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToResMusics(ResMusic resMusic) { base.AddObject("ResMusics", resMusic); }
/// <summary> /// 创建新的 ResMusic 对象。 /// </summary> /// <param name="id">id 属性的初始值。</param> public static ResMusic CreateResMusic(global::System.String id) { ResMusic resMusic = new ResMusic(); resMusic.id = id; return resMusic; }
private ResMusic GetMusicDetail(string res_id, FileInfo file) { ResMusic music = new ResMusic(); Folder folder = osShell.NameSpace(file.DirectoryName); FolderItem folderitem = folder.ParseName(file.Name); music.id = res_id; music.title = folder.GetDetailsOf(folderitem, 10); music.artist = folder.GetDetailsOf(folderitem, 9); music.album = folder.GetDetailsOf(folderitem, 17); music.publish = folder.GetDetailsOf(folderitem, 4); music.music_type = folder.GetDetailsOf(folderitem, 2); return music; }