public void DeleteCommit(IMyShow myShow) { Checks.Argument.IsNotNull(myShow, "myShow"); using (IUnitOfWork u = UnitOfWork.Begin()) { _repo.Remove(myShow); u.Commit(); } }
public void SaveCommit(IMyShow myShow, out bool success) { using (IUnitOfWork u = UnitOfWork.Begin()) { Save(myShow, out success); if (success) { u.Commit(); } } }
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; } } }
public void Delete(IMyShow myShow) { Checks.Argument.IsNotNull(myShow, "myShow"); _repo.Remove(myShow); }
public void DeleteCommit(IMyShow myShow) { Checks.Argument.IsNotNull(myShow, "myShow"); using (IUnitOfWork u = UnitOfWork.Begin()) { _repo.Remove(myShow); u.Commit(); } }
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; } } }
public void SaveCommit(IMyShow myShow, out bool success) { using (IUnitOfWork u = UnitOfWork.Begin()) { Save(myShow, out success); if (success) u.Commit(); } }
public void Delete(IMyShow myShow) { Checks.Argument.IsNotNull(myShow, "myShow"); _repo.Remove(myShow); }