Пример #1
0
        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);
        }
Пример #2
0
        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();
            }
        }