예제 #1
0
        static void Main(string[] args)
        {
            AlbumMusic a = new AlbumMusic()
            {
                NameAlmum = "ss"
            };



            Music m = new Music()
            {
                MusicAddress = "dd",
                MusicName    = "aa",
            };

            Singer s = new Singer()
            {
                SignerName = "bb"
            };

            uowPleerMusic pm = new uowPleerMusic();

            pm.pMusic.Insert(m);
            pm.pAlbumMusic.Insert(a);
            pm.pSinger.Insert(s);

            pm.Save();
        }
예제 #2
0
 public async static Task DeleteAddressesFromDb()
 {
     await Task.Run(() =>
     {
         using (uowPleerMusic db = new uowPleerMusic())
         {
             foreach (var item in db.pMusic.GetAll())
             {
                 if (!File.Exists(item.MusicAddress))
                 {
                     db.pMusic.Delete(item);
                 }
             }
             db.Save();
         }
     });
 }