Пример #1
0
        public void DeleteCommit(IMyShow myShow)
        {
            Checks.Argument.IsNotNull(myShow, "myShow");

            using (IUnitOfWork u = UnitOfWork.Begin())
            {
                _repo.Remove(myShow);
                u.Commit();
            }
        }
Пример #2
0
 public void SaveCommit(IMyShow myShow, out bool success)
 {
     using (IUnitOfWork u = UnitOfWork.Begin())
     {
         Save(myShow, out success);
         if (success)
         {
             u.Commit();
         }
     }
 }
Пример #3
0
        public void Save(IMyShow myShow, out bool success)
        {
            Checks.Argument.IsNotNull(myShow, "myShow");

            success = false;

            if (null == _repo.FindByMyShowId(myShow.MyShowId))
            {
                try
                {
                    _repo.Add(myShow);
                    success = true;
                }
                catch (Exception ex)
                {
                    success = false;
                }
            }
        }
Пример #4
0
        public void Delete(IMyShow myShow)
        {
            Checks.Argument.IsNotNull(myShow, "myShow");

            _repo.Remove(myShow);
        }
Пример #5
0
        public void DeleteCommit(IMyShow myShow)
        {
            Checks.Argument.IsNotNull(myShow, "myShow");

            using (IUnitOfWork u = UnitOfWork.Begin())
            {
                _repo.Remove(myShow);
                u.Commit();
            }
        }
Пример #6
0
        public void Save(IMyShow myShow, out bool success)
        {
            Checks.Argument.IsNotNull(myShow, "myShow");

            success = false;

            if (null == _repo.FindByMyShowId(myShow.MyShowId))
            {
                try
                {
                    _repo.Add(myShow);
                    success = true;
                }
                catch (Exception ex)
                {
                    success = false;
                }
            }
        }
Пример #7
0
 public void SaveCommit(IMyShow myShow, out bool success)
 {
     using (IUnitOfWork u = UnitOfWork.Begin())
     {
         Save(myShow, out success);
         if (success)
             u.Commit();
     }
 }
Пример #8
0
        public void Delete(IMyShow myShow)
        {
            Checks.Argument.IsNotNull(myShow, "myShow");

            _repo.Remove(myShow);
        }