예제 #1
0
        public void Delete(ITag tag)
        {
            Checks.Argument.IsNotNull(tag, "tag");

            using (IUnitOfWork u = UnitOfWork.Begin()) {
                _repo.Remove(tag);
                u.Commit();
            }
        }
        public void Delete(ISubscription subscription)
        {
            Checks.Argument.IsNotNull(subscription, "subscription");

            using (IUnitOfWork u = UnitOfWork.Begin()) {
                _repo.Remove(subscription);
                u.Commit();
            }
        }
예제 #3
0
        public void Delete(IShow show)
        {
            Checks.Argument.IsNotNull(show, "show");

            using (IUnitOfWork u = UnitOfWork.Begin()) {
                _repo.Remove(show);
                u.Commit();
            }
        }
예제 #4
0
 public void SaveCommit(ITag tag, out bool success)
 {
     using (IUnitOfWork u = UnitOfWork.Begin()) {
         Save(tag, out success);
         if (success)
         {
             u.Commit();
         }
     }
 }
 public void SaveCommit(ISubscription subscription, out bool success)
 {
     using (IUnitOfWork u = UnitOfWork.Begin()) {
         Save(subscription, out success);
         if (success)
         {
             u.Commit();
         }
     }
 }
예제 #6
0
 public void SaveCommit(IListenedShow show, out bool success)
 {
     using (IUnitOfWork u = UnitOfWork.Begin())
     {
         Save(show, out success);
         if (success)
         {
             u.Commit();
         }
     }
 }
예제 #7
0
        //Delete all ShowTags associated with that Tag
        public void Delete(Guid tagId)
        {
            Checks.Argument.IsNotNull(tagId, "tagId");

            var tags = GetShowTagsByTagId(tagId);

            if (tags == null || tags.Count <= 0)
            {
                return;
            }

            using (IUnitOfWork u = UnitOfWork.Begin()) {
                foreach (IShowTag tag in tags)
                {
                    _repo.Remove(tag);
                }

                u.Commit();
            }
        }