Exemplo n.º 1
0
 public void SaveCommit(ISetSong song, out bool success)
 {
     using (IUnitOfWork uow = UnitOfWork.Begin())
     {
         Save(song, out success);
         if (success)
             uow.Commit();
     }
 }
Exemplo n.º 2
0
        //make it delete any shows it is related to.  or not if you want those always kept.
        public void DeleteCommit(ISetSong song)
        {
            Checks.Argument.IsNotNull(song, "song");

            using (IUnitOfWork u = UnitOfWork.Begin())
            {
                _repo.Remove(song);
                u.Commit();
            }
        }
Exemplo n.º 3
0
 public void SaveCommit(ISetSong song, out bool success)
 {
     using (IUnitOfWork uow = UnitOfWork.Begin())
     {
         Save(song, out success);
         if (success)
         {
             uow.Commit();
         }
     }
 }
Exemplo n.º 4
0
        //consider changing the out parameter to a validation type object
        public void Save(ISetSong song, out bool success)
        {
            Checks.Argument.IsNotNull(song, "song");

            success = false;

            if (null == _repo.FindBySetSongId(song.SetSongId))
            {
                try
                {
                    _repo.Add(song);
                    success = true;
                }
                catch (Exception ex)
                {
                    success = false;
                }
            }
        }
Exemplo n.º 5
0
        //consider changing the out parameter to a validation type object
        public void Save(ISetSong song, out bool success)
        {
            Checks.Argument.IsNotNull(song, "song");

            success = false;

            if (null == _repo.FindBySetSongId(song.SetSongId))
            {
                try
                {
                    _repo.Add(song);
                    success = true;
                }
                catch (Exception ex)
                {
                    success = false;
                }
            }
        }
Exemplo n.º 6
0
        public void Delete(ISetSong song)
        {
            Checks.Argument.IsNotNull(song, "song");

            _repo.Remove(song);
        }
Exemplo n.º 7
0
        //make it delete any shows it is related to.  or not if you want those always kept.
        public void DeleteCommit(ISetSong song)
        {
            Checks.Argument.IsNotNull(song, "song");

            using (IUnitOfWork u = UnitOfWork.Begin())
            {
                _repo.Remove(song);
                u.Commit();
            }
        }
Exemplo n.º 8
0
        public void Delete(ISetSong song)
        {
            Checks.Argument.IsNotNull(song, "song");

            _repo.Remove(song);
        }