public void SaveGroupMap(GroupChannelMap map) { #region Validate parameters if (map == null) { throw new ArgumentNullException("map"); } #endregion DAO.GroupChannelMap dao = map.ToDao(); using (UnitOfWork work = BeginWork()) { if (dao.LINK == 0) { work.Save(dao); } else { work.Update <DAO.GroupChannelMap>(ref dao); } work.End(); } dao.CloneTo(map); }
public void DeleteGroupMap(GroupChannelMap map) { #region Validate parameters if (map == null) { throw new ArgumentNullException("map"); } #endregion DAO.GroupChannelMap dao = map.ToDao(); using (UnitOfWork work = BeginWork()) { work.Delete(dao); work.End(); } }